Sitemap

Member-only story

Enabling VisBuilder on Amazon OpenSearch.

Alex
3 min readApr 29, 2025

Vega is a declarative visualization grammar that allows you to create highly customizable and complex visualizations in OpenSearch Dashboards.

An example of a Vega JSON definition for a bar chart.

{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"data": [
{
"name": "table",
"values": [
{"category": "A", "amount": 28},
{"category": "B", "amount": 55},
{"category": "C", "amount": 43}
]
}
],
"scales": [
{
"name": "xscale",
"type": "band",
"domain": {"data": "table", "field": "category"},
"range": "width"
},
{
"name": "yscale",
"type": "linear",
"domain": {"data": "table", "field": "amount"},
"range": "height"
}
],
"marks": [
{
"type": "rect",
"from": {"data": "table"},
"encode": {
"enter": {
"x": {"scale": "xscale", "field": "category"},
"width": {"scale": "xscale", "band": 1},
"y": {"scale": "yscale", "field": "amount"},
"y2": {"scale": "yscale", "value": 0}
}
}
}
]
}

You can take a look of several and different examples at the official documentation.

--

--

Alex
Alex

Written by Alex

DevOps Lead @evinova, former Dynatrace Solutions Engineer. Cheerleader in Chief for KMMX, Technical Writer & International Speaker, Dad & 2 cats.

No responses yet