Platform
Resources
Pricing
Sign in
Get started
Britney Hoang
Workspace
Fork
Public
By
Britney Hoang
Edited
Apr 11, 2023
Fork of
D3 Dynamics baby steps
Insert cell
Insert cell
Insert cell
Insert cell
<
svg
width
=
"1000"
height
=
"300"
>
<
rect
x
=
"20"
y
=
"20"
width
=
"250"
height
=
"150"
>
</
rect
>
</
svg
>
Insert cell
myRectangle
=
d3
.
select
(
mySVG4
)
Insert cell
myRectangle
.
attr
(
"width"
,
250
)
.
attr
(
"height"
,
150
)
Insert cell
Insert cell
<
svg
width
=
"1000"
height
=
"300"
>
<
rect
x
=
"20"
y
=
"20"
width
=
"250"
height
=
"150"
>
</
rect
>
<
circle
cx
=
"50"
cy
=
"50"
r
=
"10"
style
=
"fill: yellow"
>
</
circle
>
</
svg
>
Insert cell
myCircle
=
d3
.
select
(
mySVG5
)
.
select
(
"circle"
)
Insert cell
myCircle
.
attr
(
"r"
,
50
)
Insert cell
Insert cell
myCircle
.
style
(
"fill"
,
"red"
)
Insert cell
Insert cell
Insert cell
<
svg
width
=
"1000"
height
=
"300"
>
<
rect
x
=
"20"
y
=
"20"
width
=
"250"
height
=
"150"
>
</
rect
>
<
circle
cx
=
"50"
cy
=
"50"
r
=
"10"
style
=
"fill: yellow"
>
</
circle
>
</
svg
>
Insert cell
myRectangle2
=
d3
.
select
(
mySVG6
)
.
select
(
"rect"
)
Insert cell
myRectangle2
.
attr
(
"x"
,
500
)
Insert cell
myRectangle2
.
attr
(
"x"
,
50
)
Insert cell
Insert cell
Insert cell
Insert cell
myRectangle3
=
d3
.
select
(
mySVG7
)
.
select
(
"rect"
)
Insert cell
myRectangle3
.
transition
(
)
.
duration
(
1000
)
.
attr
(
"x"
,
500
)
Insert cell
myRectangle3
.
transition
(
)
.
duration
(
1000
)
.
attr
(
"x"
,
50
)
Insert cell
myRectangle3
.
transition
(
)
.
ease
(
d3
.
easeLinear
)
.
duration
(
1000
)
.
attr
(
"x"
,
500
)
Insert cell
myRectangle3
.
transition
(
)
.
ease
(
d3
.
easeBounce
)
.
duration
(
1000
)
.
attr
(
"x"
,
50
)
Insert cell
Insert cell
Insert cell
Insert cell
myCircle2
=
d3
.
select
(
mySVG8
)
.
select
(
"circle"
)
Insert cell
myCircle2
.
transition
(
)
.
duration
(
1000
)
.
attr
(
"cx"
,
500
)
.
attr
(
"r"
,
150
)
.
style
(
"fill"
,
"red"
)
Insert cell
myCircle2
.
transition
(
)
.
duration
(
1000
)
.
attr
(
"cx"
,
50
)
.
attr
(
"r"
,
20
)
.
style
(
"fill"
,
"yellow"
)
Insert cell
Insert cell
<
svg
width
=
"1000"
height
=
"300"
>
<
rect
x
=
"20"
y
=
"20"
width
=
"250"
height
=
"150"
>
</
rect
>
<
circle
cx
=
"50"
cy
=
"50"
r
=
"10"
style
=
"fill: yellow"
>
</
circle
>
<
line
x1
=
"500"
x2
=
"600"
y1
=
"150"
y2
=
"150"
style
=
"stroke: blue; stroke-width: 2px"
>
</
line
>
</
svg
>
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
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mySVG4
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mySVG5
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
myCircle
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mySVG6
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
myRectangle2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mySVG7
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
myRectangle3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mySVG8
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
myCircle2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mySVG9
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML