OpenSource For You

Marks

-

A Marks section is the most important in the Vega specificat­ion and is the basic building block of visualisat­ion. 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 visualisat­ion using employment statistics from http://data.gov.in/ and it is available in https:// github.com/karthikeya­n-r/VegaGramma­r.

Newspapers in English

Newspapers from India