# Vega Reference Overview

A Vega specification is a JSON-formatted structure that describes a visualization, which can be sent to the back end for rendering. This document introduces the the Vega specification syntax and provides links to topics that provide more details about each Vega property.

For examples of using Vega, see [Tutorials](/v8.3.0/apis-and-interfaces/vega/vega-tutorials.md). You can also see and edit examples in [Try Vega](/v8.3.0/apis-and-interfaces/vega/try-vega.md).

## Specification Language Syntax

The Vega specification includes properties for describing the source data, mapping the data to the visualization area, and visual encoding. The root Vega specification supported by OmniSci has the following JSON structure and top-level properties:

```
{
  "width": <number>,
  "height": <number>,
  "data": [],
  "projections": [],
  "scales": [],
  "marks": []
}
```

| Property                                                                                          | Type             | Description                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `width` and `height`                                                                              | unsigned integer | <p>Visualization area width and height, in pixels. Both properties are required.<br><strong>Example:</strong> Set the viewing area width to 384 pixels and the height to 564 pixels:</p> |
| [`data`](/v8.3.0/apis-and-interfaces/vega/vega-reference-overview/data-property.md)               | array            | <p>Source data. The Vega data model uses tabular data, similar to a spreadsheet. Organized in rows with any number of named columns.<br>JSON format:<br></p>                             |
| [`projections`](/v8.3.0/apis-and-interfaces/vega/vega-reference-overview/projections-property.md) | array            | <p>Projection data. Maps longitude and latitude data to projected <code>x</code> and <code>y</code> coordinates.<br>JSON format:</p>                                                     |
| [`scales`](/v8.3.0/apis-and-interfaces/vega/vega-reference-overview/scales-property.md)           | array            | <p>Data-to-visualization area mapping. Maps visually encoded data values to pixel positions with attributes, such as color.<br>JSON format:</p>                                          |
| [`marks`](/v8.3.0/apis-and-interfaces/vega/vega-reference-overview/marks-property.md)             | array            | <p>Geometric primitive used to visually encode data.<br>JSON format:</p>                                                                                                                 |

### Format Rules

* Property names are case-sensitive.
* Property values are typed.
* Unsupported properties are ignored by the rendering engine.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.heavy.ai/v8.3.0/apis-and-interfaces/vega/vega-reference-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
