Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.
vl.markCircle()// Make a scatter chart
.data(cars)// Using the cars data (below)
.encode(
vl.x().fieldQ("Horsepower"),// For x, use the Horsepower field
vl.y().fieldQ("Miles_per_Gallon"),// For y, use the Miles_per_Gallon field
vl.tooltip().fieldN("Name")// For tooltips, show the Name field
)
.render()// Draw the chart
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.