Published
Edited
Sep 26, 2020
Importers
Insert cell
md`# Top Level Vega Spec`
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
md` The **data** are the most important property in Vega spec. You can supply and transform the data before visualizing it into the graph.`
Insert cell
Insert cell
myData_1 = new data({name:"data_1"})
Insert cell
myData_1.values = [{x:1},{x:2},{x:3}]
Insert cell
myData_2= new data("data_2")
Insert cell
myData_2.values = [{x:2},{x:2},{x:1}]
Insert cell
md`## scales`
Insert cell
md` Scales are a fundamental building block of data visualization, as they determine the nature of visual encodings.`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
myscale_2 = myScale_1.setType("linear")
Insert cell
myScale_1.setDomain("myData","time")
Insert cell
Insert cell
md` In **axes** we must set scale and orient properties.`
Insert cell
Insert cell
md`## legends`
Insert cell
Insert cell
md`## marks`
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