<p> It's what all your websites are built in at the end of the day.</p>
<div>
<p> Whoa! I'm writing HTML!</p>
</div>
<h3>HTML is</h3>
<ul>
<li>Fun</li>
<li>Cool</li>
<li>Old</li>
</ul>
</div>
htl.html`<p> You can write also write HTML in a JavaScript cell using htl.html! We'll do this often for D3 examples, since we're working with JavaScript when writing D3.`
{
constlabel=d=>d.data.node
constroot=stratifyTree(getDOMTree(myChart))
returngraph(root,{label:label})
}
{
consthtml=htl.html`<div>
<p>First Paragraph</p>
<p>Second Paragraph</p>
<p>Third Paragraph</p>
</div>`
returnhtml
}
scatterChart={
// chart dimensions
constwidth=500;
constheight=300;
constmarginRight=20;
constmarginTop=25;
constmarginBottom=35;
constmarginLeft=40;
constx=d3.scaleLinear()
.domain(d3.extent(cars))
.range();
}
cars
carsData
cars
Type Table, then Shift-Enter. Ctrl-space for more options.
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.