Published
Edited
Dec 28, 2021
Fork of Line Graph
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// parser for x axis. what format is the date field in your data?
// more details available here: https://github.com/d3/d3-time-format
// examples:
// "%Y" - 2021
// "%B %d, %Y" - November 14, 2021
timeParse = d3.timeParse("%d/%m/%Y")
Insert cell
sampleTime = timeParse(sampleDatum[spreadBy])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
lines = [line1, line2]
Insert cell
Insert cell
Insert cell
colors = ["#000", "#9a9a9a"]
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