Hello,
In my Vega-Lit spec I do a query which returns the following response:
"aggregations" : {
"my-groups" : {
"buckets" : {
"group-1" : {
"doc_count" : 16958
},
"group-2" : {
"doc_count" : 3248
},
"group-3" : {
"doc_count" : 408
}
}
}
}
}
I have a Vega-lite barchart like that:
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data":
{
"url": {
# Query which returns the above result
},
"format": {
"property": "aggregations.my-groups.buckets"
}
},
"transform": [{
"fold": [
"group-1",
"group-2",
"group-3"
]
}],
"mark": bar
"encoding": {
"x": {
"field": "key",
"type": "ordinal",
},
"y": {
"field": "value.doc_count",
"type": "quantitative"
}
}
}
The confusing thing is, that I see a result on 'Vega-Lite-Editor' but not in Kibana itself.
It shows just a X-Axis, a Y-Axis, and nothing more.
The following example can also be displayed in the Online Editor, but not on Kibana.
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"data": {
"values": [{
"buckets" : {
"CERTIFICATE" : {
"doc_count" : 167523
},
"MSCERTIFICATE" : {
"doc_count" : 4865
}
}
}]
},
"transform": [{
"fold": ["buckets.CERTIFICATE", "buckets.MSCERTIFICATE"]
}],
"mark": "bar",
"encoding": {
"x": {
"field": "key",
"type": "ordinal"
},
"y": {
"field": "value.doc_count",
"type": "quantitative"
}
}
}