Published
Edited
Sep 18, 2019
1 fork
Insert cell
Insert cell
vl.markArea({interpolate:"monotone",stroke:"black",fill:"hotpink"})
.title("Homeruns(Ruth,Mays,Bonds)")
.width(250)
.data(data)
.encode(
vl.x().fieldQ("yearID").axis({format:".0f",title:"year"}),
vl.y().fieldQ("HR").axis({title:"season homerun total"}),
vl.row().fieldN("playerID"),
vl.color().fieldN("playerID")
)
.resolve({scale:{x:"independent"}})
.render()
Insert cell
Insert cell
Insert cell
Insert cell
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