Public
Edited
Nov 21, 2022
4 forks
4 stars
Insert cell
Insert cell
chart = {
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, width, height])
.style("overflow", "visible");

//Draw a rect
svg
.append("rect")
.attr("x", 100)
.attr("y", 100)
.attr("width", 250)
.attr("height", 250);

//Draw a circle
svg.append("circle").attr("cx", 150).attr("cy", 250).attr("r", 100);

//Draw a line
svg
.append("line")
.attr("x1", 150)
.attr("x2", 550)
.attr("y1", 250)
.attr("y2", 250);

//Draw a text
svg.append("text").attr("x", 160).attr("y", 255).text("IN LOVE WITH DATAVIZ");

return svg.node();
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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