Hi,
I try to do a, sort of gantt chart, in VEGA. This chart should display on x-axes the time and on y-axes devices been used. So the user can adjust with the time picker and sees all devices been used in this period of time.
When debugging i see that there is the data, but i don´t know how to access it.
So basically the question is, as shown in the image, I want the key from timebuckets.buckets on the x-axes and the key from timebuckets.buckets.tags.buckets on the y-axes (device names)
{
"$schema": "https://vega.github.io/schema/vega/v4.json",
"data": {
"name":"mydata",
"url": {
"%context%": true,
"%timefield%": "time",
"index": "myIdx",
"body": {
"size": 0,
"aggs" : {
"time_buckets" : {
"date_histogram" : {
"field" : "time",
"interval" : "1d"
},
"aggs": {
"tags": {
"terms": {
"field": "deviceName.keyword",
"size":10
}
}
}
}}
},
"format": {"property": "aggregations.time_buckets.buckets"} // is this correct?
}},
So i´m not sure about the "format" and about accessing the key values in a "marks" to draw the chart.
Do i need the transform for the time? Any help on this would be nice!
Thanks in advance Oliver