Platform
Resources
Pricing
Sign in
Get started
philippkoytek
Workspace
Fork
Published
D3 Tutorial
By
philippkoytek
Edited
Dec 1, 2020
Insert cell
Insert cell
Insert cell
Insert cell
import
{
scatterplot
,
barchart
}
with
{
chartWidth
as
width
,
mutable
mySelectedData
as
selectedData
}
from
"@philippkoytek/d3-part-2-simple-interaction"
;
Insert cell
html
`
<h3> Two Charts </h3>
<div style="display: flex">
<div>${
scatterplot
}</div>
<div>${
barchart
}</div>
</div>
<p>selected: ${
mySelectedData
&&
mySelectedData
.
country
} </p>
`
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
chartWidth
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
mySelectedData
Edit
Pin
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML