Published unlisted
Edited
Mar 29, 2019
1 star
Insert cell
Insert cell
highlight = require('https://bundle.run/highlight.js@9.15.6')
Insert cell
{
const code = html`<pre><code class="python">
from browser import window, document
d3 = window.d3

circles = svg.select("g.circlesGroup")
if (circles.empty()):
circles = svg.append("g")
circles.classed("circlesGroup", True)

def init(ev):
inp = inp0.value
btn0.title = inp + ' - centered'
colorsN = inp.split(',')

</code></pre>`;
highlight.highlightBlock(code.children[0]);
return code;
}
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.
Learn more