Marks

OpenSource For You - - DEVELOPERS -

A Marks sec­tion is the most im­por­tant in the Vega spec­i­fi­ca­tion and is the ba­sic build­ing block of vi­su­al­i­sa­tion. This sec­tion de­fines the type of plot­ting to vi­su­alise the data such as arc, rec­tan­gles, line, area, sym­bols and im­ages. The spe­cial mark type group is used to group el­e­ments and vi­su­alise the data.

"marks": [

{ "type": "rect", "from": {"data":"ta­ble"}, "prop­er­ties": { "en­ter": { "x": {"scale":"x", "field":"data.x"}, "width": {"scale":"x", "band":true, "off­set":-1}, "y": {"scale":"y", "field":"data.y"}, "y2": {"scale":"y", "value":0} }, "up­date": { "fill": {"value":"steel­blue"} },

"hover": { "fill": {"value":"red"} }

} }

]

We have cre­ated a Vega vi­su­al­i­sa­tion us­ing em­ploy­ment sta­tis­tics from http://data.gov.in/ and it is avail­able in https:// github.com/karthikeyan-r/Ve­gaGram­mar.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.