Public
Edited
Jan 1, 2024
1 fork
Insert cell
Insert cell
{
const X = cm.range(50, cm.TWO_PI);

function update(app) {
app.append(cm.clear, { fill: cm.rgb(255) });
app
.data(X)
.append(cm.circle, {
x: (d) => d,
y: (d) => Math.sin(d + app.prop("frameCount") / 30),
r: 20,
fill: "rgba(175, 175, 175, 0.5)",
stroke: "#000",
strokeWidth: 1
})
.transform(cm.mapPosition);
}

function dispose(app) {
invalidation.then(() => app.dispose());
}

return cm
.app({ width: 600, height: 200 })
.on("update", update)
.call(dispose)
.start()
.node();
}
Insert cell
cm = require("@charming-art/charming@0.0.6")
Insert cell
import { quote } from "@pearmini/charming-shared"
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