Platform
Resources
Pricing
Sign in
Get started
Maya Gans
Workspace
Fork
Published
By
Maya Gans
Edited
Apr 23, 2022
1 star
Insert cell
Insert cell
display
=
[
"First"
,
"2"
,
"III"
,
"Custom4"
,
"5"
,
"SIX"
]
Insert cell
axis
(
d3
.
scaleLinear
(
)
)
.
ticks
(
5
)
.
tickFormat
(
(
d
,
i
)
=>
display
[
i
]
)
.
render
(
)
Insert cell
function
axis
(
scale
)
{
return
Object
.
assign
(
d3
.
axisBottom
(
scale
.
range
(
[
20
,
width
-
20
]
)
)
,
{
render
(
)
{
return
d3
.
create
(
"svg"
)
.
attr
(
"viewBox"
,
[
0
,
-
10
,
width
,
33
]
)
.
call
(
this
)
.
node
(
)
;
}
}
)
;
}
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
display
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
axis
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML