Platform
Resources
Pricing
Sign in
Get started
Mykhailo
Workspace
Fork
Published
By
Mykhailo
Edited
Sep 8, 2022
Fork of
simple Donut chart from the D3.js Graph Gallery
Insert cell
Insert cell
{
yield
html
`
<div id="chart">
</div>`
;
drawDonut
(
)
;
}
Insert cell
Insert cell
Insert cell
radius
=
Math
.
min
(
width
,
dimensions
.
height
)
/
2
-
dimensions
.
margin
.
left
Insert cell
dimensions
=
(
{
height
:
400
,
width
:
500
,
margin
:
{
top
:
10
,
right
:
10
,
bottom
:
10
,
left
:
40
,
}
}
)
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
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
drawDonut
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
radius
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dimensions
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