You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to data in Elasticsearch that I am creating customised line chart using vega-lite because I want to plot raw values
The first set of data is in second intervals and the graph plots ok
The second set of data is in 100 or so milisecond interval but the vega-lite x axis only shows a small section of data around 40 seconds worth
i am using a code i found online using size:10000 as below;
Do i have to try and get the second data in second intervals only so that this can work? The second interval data plots ok but the 100millisecond interval data only plots on a small 40min scale
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have to data in Elasticsearch that I am creating customised line chart using vega-lite because I want to plot raw values
The first set of data is in second intervals and the graph plots ok
The second set of data is in 100 or so milisecond interval but the vega-lite x axis only shows a small section of data around 40 seconds worth
i am using a code i found online using size:10000 as below;
Do i have to try and get the second data in second intervals only so that this can work? The second interval data plots ok but the 100millisecond interval data only plots on a small 40min scale
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"title": xxxxx,
"background": white
"mark": "line",
"data": {
"url": {
"%context%": true,
"%timefield%": "timestamp",
"index": "atpath",
"body": {
"size": 10000,
"_source": ["timestamp", "a_speed", "atp_location", "kmark"]
}
},
"format": {"property": "hits.hits"}
},
"transform": [
{"calculate": "toDate(datum._source['timestamp'])", "as": "time"}
],
"encoding": {
"x": {
"field": "time",
"scale": {"type": "utc"},
"type": "temporal",
"axis": {"title": "Time in AWST"}
},
"y": {"field": "_source.a_speed", "type": "quantitative","title": "Speed Km / hr"},
"tooltip": [
{"field": "_source.atp_location", "title": "KM Mark","color":"blue", " type": "quantitative"}
{"field": "_source.timestamp", "title": "Date/Time", " type": "temporal"}
],
}
}
Beta Was this translation helpful? Give feedback.
All reactions