Public
Edited
Dec 24, 2022
Insert cell
Insert cell
data =[
{x:12,y:800},{x:24,y:456},{x:36,y:1223}
]
Insert cell
x = d3.scaleLinear().
domain(d3.extent(data, d => d.x))
Insert cell
x.domain()
Insert cell
height = 500
Insert cell
margin = ({top:30, right:30, bottom:30, left:30})
Insert cell
chart = {
const svg = d3.create("svg").attr("viewBox", [0,0, width,height]);
return svg.node();
}
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