Platform
Resources
Pricing
Sign in
Get started
Magnus Jacobsson
Workspace
Fork
Published unlisted
By
Magnus Jacobsson
Edited
May 21, 2018
Insert cell
Insert cell
svg
=
{
rerun
;
//const svgSel = d3.select(DOM.svg(width, r0 + r1));
const
svgSel
=
d3
.
select
(
html
`<svg id="mysvg" width=${
width
} height=${
r0
+
r1
}><div>`
)
;
svgSel
.
append
(
"circle"
)
.
attr
(
"cx"
,
r1
)
.
attr
(
"cy"
,
r1
)
.
attr
(
"r"
,
r0
)
.
attr
(
"stroke"
,
"black"
)
.
attr
(
"fill"
,
"black"
)
;
return
svgSel
.
node
(
)
;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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
svg
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
another_svg
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
rerun
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
svg_transition
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
r0
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
r1
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML