Platform
Resources
Pricing
Sign in
Get started
Stefan Reifenberg
Workspace
Fork
Published
By
Stefan Reifenberg
Edited
Jun 3, 2020
1
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
height
=
600
Insert cell
margin
=
(
{
top
:
20
,
right
:
70
,
bottom
:
30
,
left
:
60
}
)
Insert cell
Insert cell
y
=
d3
.
scaleLinear
(
)
.
domain
(
[
-
15
,
d3
.
max
(
data
.
series
,
d
=>
d3
.
max
(
d
.
values
)
)
]
)
.
nice
(
)
.
range
(
[
height
-
margin
.
bottom
,
margin
.
top
]
)
Insert cell
xAxis
=
g
=>
g
.
attr
(
"transform"
,
`translate(0,${
height
-
margin
.
bottom
})`
)
.
call
(
d3
.
axisBottom
(
x
)
.
ticks
(
width
/
80
)
.
tickSizeOuter
(
0
)
.
tickFormat
(
d3
.
timeFormat
(
"%b"
)
)
)
Insert cell
Insert cell
Insert cell
d3
=
require
(
"d3@5"
,
"d3-array@2"
)
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
hover
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
height
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
margin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
x
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
y
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
xAxis
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
yAxis
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
line
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML