I want make a simple diagram where I take data from index for 2 ordinal variables and using one of the ordinal variables as a key for x axis count the other ordinal variable on y axis and show it as a histogram.
this is what I did -
{
$schema: "https://vega.github.io/schema/vega/v3.0.json"
"title": "Event counts from all indexes"
"data": {
"url": {
"index": "apm*",
"body": {
"query" : {
"range" : { "@timestamp" : {"%timefilter%" : true }}
},
size : 1000
_source: ["@timestamp","lables.application", "lables.platform", "lables.correlation_id", "lables.is_error", "process.pid"]
}
}
format: {property: "hits.hits"}
}
"mark" : "bar"
"encoding": {
"x" : {
"field" : "datum._source['lables.application']", "type" : "nominal"
},
"y" : {
"field" : "datum._source['lables.platform'], "type" : "nominal"
}
}
}
}