Platform
Resources
Pricing
Sign in
Get started
Katie L
Workspace
Fork
Public
By
Katie L
Edited
May 3, 2020
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
arc_basic
=
d3
.
arc
(
)
.
innerRadius
(
50
)
.
outerRadius
(
75
)
.
startAngle
(
0
)
.
endAngle
(
2
*
Math
.
PI
)
Insert cell
Insert cell
html
`<svg viewBox="-150 -150 300 300" style="max-width: 300px;">
${
Array
.
from
(
{
length
:
n
}
,
(
_
,
i
)
=>
svg
`<path stroke="black" fill="steelblue" d="${
arc
(
)
}"></path>`
)
}
</svg>`
Insert cell
Insert cell
arc
=
d3
.
arc
(
)
.
innerRadius
(
n
+
50
)
.
outerRadius
(
n
+
75
)
.
startAngle
(
0
)
.
endAngle
(
2
*
Math
.
PI
)
Insert cell
Insert cell
Insert cell
html
`<svg viewBox="-150 -150 300 300" style="max-width: 300px;">
${
svg
`<path stroke="black" fill="#8c241b" d="${
arc
(
)
}"></path>`
}
</svg>`
Insert cell
Insert cell
// this is a secondary inner tubing
arc2
=
d3
.
arc
(
)
.
innerRadius
(
n
+
30
)
.
outerRadius
(
n
+
50
)
.
startAngle
(
0
)
.
endAngle
(
2
*
Math
.
PI
)
Insert cell
html
`<svg viewBox="-150 -150 300 300" style="max-width: 300px;">
${
svg
`<path stroke="none" fill="#8c241b" d="${
arc
(
)
}"></path>`
}
${
svg
`<path stroke="none" fill="#c98a7d" d="${
arc2
(
)
}"></path>`
}
</svg>`
Insert cell
Insert cell
outer_arc
=
d3
.
arc
(
)
.
innerRadius
(
55
)
.
outerRadius
(
60
)
.
startAngle
(
0
)
.
endAngle
(
2
*
Math
.
PI
)
Insert cell
inner_arc
=
d3
.
arc
(
)
.
innerRadius
(
50
-
inflammation
/
3
)
.
outerRadius
(
55
)
.
startAngle
(
0
)
.
endAngle
(
2
*
Math
.
PI
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
html
`<svg viewBox="0 0 400 400" style="max-width: 600px;">
${
my_chart_styled
}
</svg>`
Insert cell
Insert cell
Insert cell
d3
=
require
(
"d3@5"
)
Insert cell
chart_width
=
400
;
Insert cell
chart_height
=
400
Insert cell
formatDay
=
d
=>
"SMTWTFS"
[
d
.
getUTCDay
(
)
]
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
arc_basic
Add comment
Copy import
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
arc
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
n
Edit
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
arc2
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
outer_arc
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
inner_arc
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
inflammation
Edit
Add comment
Copy import
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
waves
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
pi_lines
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
area
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
x_converter
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
my_chart_styled
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
health
Edit
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart_width
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart_height
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
formatDay
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML