Platform
Resources
Pricing
Sign in
Get started
SUGIMOTO Tatsuo
Designer, Artist, Researcher, Educator @sugi2000lab . co-translator for Japanese edition of “Generative Design” and “Code as Creative Medium”.
Workspace
Fork
Published
By
SUGIMOTO Tatsuo
Edited
Nov 8, 2019
1 fork
Insert cell
md
`# D3 Tutorial 14-1`
Insert cell
dataset
=
[
[
5
,
20
]
,
[
480
,
90
]
,
[
250
,
50
]
,
[
100
,
33
]
,
[
330
,
95
]
,
[
410
,
12
]
,
[
475
,
44
]
,
[
25
,
67
]
,
[
85
,
21
]
,
[
220
,
88
]
]
;
Insert cell
w
=
500
Insert cell
h
=
100
Insert cell
svg
=
{
const
svg
=
DOM
.
svg
(
w
,
h
)
d3
.
select
(
svg
)
.
selectAll
(
"circle"
)
.
data
(
dataset
)
.
enter
(
)
.
append
(
"circle"
)
.
attr
(
"cx"
,
function
(
d
)
{
return
d
[
0
]
;
}
)
.
attr
(
"cy"
,
function
(
d
)
{
return
d
[
1
]
;
}
)
.
attr
(
"r"
,
5
)
;
return
svg
}
Insert cell
style
=
html
`<style>
</style>`
Insert cell
d3
=
require
(
'd3@5'
)
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dataset
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
w
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
h
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
svg
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
style
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