Published
Edited
Aug 28, 2019
Insert cell
Insert cell
Insert cell
viewof x = slider({max:10,step:1})
Insert cell
viewof y = slider({max:10,step:1})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = [
{x:2,y:1},
{x:x,y:y},
{x:9,y:3}
]
Insert cell
line = vl.markLine({stroke:"red",size:2})
.width(200)
.height(200)
.data(data)
.encode(
vl.x().fieldQ("x").scale({domain:[0,10]}),
vl.y().fieldQ("y").scale({domain:[0,10]})
)

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