The demo shown below is taken from the official Vega-Lite example gallery here. |
{ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "width": 500, "height": 300, "data": { "url": "https://vega.github.io/vega-lite/data/us-10m.json", "format": { "type": "topojson", "feature": "counties" } }, "transform": [{ "lookup": "id", "from": { "data": { "url": "https://vega.github.io/vega-lite/data/unemployment.tsv" }, "key": "id", "fields": ["rate"] } }], "projection": { "type": "albersUsa" }, "mark": "geoshape", "encoding": { "color": { "field": "rate", "type": "quantitative" } } } |
Textual representation
{ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "width": 500, "height": 300, "data": { "url": "https://vega.github.io/vega-lite/data/us-10m.json", "format": { "type": "topojson", "feature": "counties" } }, "transform": [{ "lookup": "id", "from": { "data": { "url": "https://vega.github.io/vega-lite/data/unemployment.tsv" }, "key": "id", "fields": ["rate"] } }], "projection": { "type": "albersUsa" }, "mark": "geoshape", "encoding": { "color": { "field": "rate", "type": "quantitative" } } } |
The code above is rendered by "Prism Syntax Highlighter for Confluence" which supports highlighting JSON syntax.
👉 Check out the official Vega-Lite documentation here https://vega.github.io/vega-lite/docs/ .