Hi all experts, I'm a beginner of this new techonolgy. I would like to use vega for display line graph that plot data values over time-series (timestamp). The goal is to represent how data values and not count of data change in the time. It's important that data is taken from the index and not imported as provided by vega library examples from json or csv. Thanks for the attention.
Data is a float variable like ANGLE that is modified in time.
below there's the starting point of the vega.
(As suggested by elastic web page I modify the index from _all to my_index but I would like to represent data in the y axis not document_count but a parametric field as Angle)
P.s. the timefield selected is correct because I insert as date field @timestamp and it's worked.
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"title": "Event counts from all indexes",
"data": {
"url": {
"%context%": true,
"%timefield%": "@timestamp",
"index": "my_index",
"body": {
"aggs": {
"time_buckets": {
"date_histogram": {
"field": "@timestamp",
"interval": {"%autointerval%": true},
"extended_bounds": {
"min": {"%timefilter%": "min"},
"max": {"%timefilter%": "max"}
},
"min_doc_count": 0
}
}
},
"size": 0
}
},
"format": {"property": "aggregations.time_buckets.buckets"}
},
"mark": "line",
"encoding": {
"x": {"field": "key", "type": "temporal", "axis": {"title": false}},
"y": {
"field": "doc_count",
"type": "quantitative",
"axis": {"title": "Document count"}
}
},
}```