Vega specification
Vega specification is a simple JSON object used for configuring the various aspects of the data that needs to be rendered. Specification consists of the dataset to be used, the type of visualisation, the data rendering algorithm and other properties of a chart like the axis, scale, legend, etc. Visualisation is the top-level property in the specification and holds all other entities of configuration. Visualisation consists of a rectangular canvas and viewport, over which all visual elements will be added. The following is a simple visualisation configuration:
{ “name”:”demo”, "width": 400, "height": 400, "padding": {"top": 5, "left": 20, "bottom": 5, "right": 20}
}
Other major components of the visualisation section are discussed below.