Hi All,
I would like to create a timeline bar chart in Kibana, preferably using canvas. I have records stored in elastic in following format:
"ParamName": "Status",
"serverTime": 1554929754800,
"value": 5,
"valueStr": "Aborted"
"ParamName": "Status",
"serverTime": 1554911420019,
"value": 3,
"valueStr": "In progress"
Those reconds mean, that status of some machine was "Aborted" from the time in "serverTime" field until the value of "serverTime" field in the next record, which represent status "In progress". The graph I'd like to create should look something like this>
I was able to achieve something similar using following Timelion query, but the problem is that this cannot be used in canvas and might produce wrong results when two recods with different values fall into same bucket (becouse of max aggregation function).
.es(index=statusst, timefield=serverTime, metric="max:value", q="ParamName:Status").fit(carry).if(eq,5,.static(0),null).color("red").lines(width=100),
.es(index=statusst, timefield=serverTime, metric="max:value", q="ParamName:Status").fit(carry).if(eq,3,.static(0),null).color("green").lines(width=100)
Closest thing to what I need, that I was able to find is this> https://discuss.elastic.co/t/bar-chart-with-of-different-values-in-canvas-how/146936/2
But that works only for portions of total, and not for time durations and I was not able to modify it..
Thanks for any help