Unlisted
Edited
Aug 12, 2023
Insert cell
Insert cell
data = [
{date: new Date("2023-04-01"), type: "triangle", value: 5},
{date: new Date("2023-04-05"), type: "circle", value: 7},
{date: new Date("2023-04-10"), type: "circle", value: 8},
{date: new Date("2023-04-15"), type: "circle", value: 3},
{date: new Date("2023-04-15"), type: "triangle", value: 7},
{date: new Date("2023-04-20"), type: "triangle", value: 4},
{date: new Date("2023-04-25"), type: "square", value: 5},
]
Insert cell
Plot.auto(data, {x: "date", y: "value", color: "type", mark: "bar"}).plot()
Insert cell
Insert cell
Plot.barY(data, {x: "date", y: "value", fill: "type"}).plot()
Insert cell
Insert cell
Insert cell
Plot.auto(aapl, {x: "Date", y: "Volume", mark: "bar"}).plot()
Insert cell
Insert cell
Plot.rectY(aapl, Plot.binX({y: "sum"}, {x: "Date", y: "Volume"})).plot()
Insert cell
Plot.rectY(aapl.slice(0, 100), Plot.binX({y: "sum"}, {x: "Date", y: "Volume", interval: "day"})).plot()
Insert cell
Insert cell
Plot.ruleX(aapl, {x: "Date", y: "Volume"}).plot()
Insert cell
Insert cell
Insert cell
Plot.barY(aapl.slice(0, 10), {x: "Date", y: "Volume", interval: "day"}).plot()
Insert cell
Plot.barY(aapl.slice(0, 10), {x: "Date", y: "Volume", interval: "day"}).plot({y: {type: "linear"}})
Insert cell
Insert cell
a = aapl
Insert cell
a
X
Date
Y
Volume
Color
Size
Facet X
Facet Y
Mark
rule
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
PlotLatest = require("https://observablehq.com/plot/plot.js")
Insert cell
PlotLatest.auto(data, {x: "date", y: "value", color: "type", mark: "bar"}).plot()
Insert cell
PlotLatest.auto(aapl, {x: "Date", y: "Volume", mark: "bar"}).plot()
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