Marks
A Marks section is the most important in the Vega specification and is the basic building block of visualisation. This section defines the type of plotting to visualise the data such as arc, rectangles, line, area, symbols and images. The special mark type group is used to group elements and visualise the data.
"marks": [
{ "type": "rect", "from": {"data":"table"}, "properties": { "enter": { "x": {"scale":"x", "field":"data.x"}, "width": {"scale":"x", "band":true, "offset":-1}, "y": {"scale":"y", "field":"data.y"}, "y2": {"scale":"y", "value":0} }, "update": { "fill": {"value":"steelblue"} },
"hover": { "fill": {"value":"red"} }
} }
]
We have created a Vega visualisation using employment statistics from http://data.gov.in/ and it is available in https:// github.com/karthikeyan-r/VegaGrammar.