AClerk
October 15, 2020, 3:09am
1
Hello,
Are there any alternatives to timelion in canvas?
I would like to show time-based data, but there are bugs with timelion that I cannot workaround.
The final result should look something like this:
Would be happy to hear any idea you might have.
Cheers!
poff
(Poff Poffenberger)
October 19, 2020, 9:31pm
2
Hey there!
Have you considered using the essql function to grab the data for your graph? Check out this example using the ecommerce sample dataset:
essql "SELECT DATE_TRUNC('hours', order_date) as \"@timestamp\", sum(taxless_total_price) as value FROM kibana_sample_data_ecommerce group by DATE_TRUNC('hours', order_date)"
| pointseries x="@timestamp" y="value"
| plot xaxis=true yaxis=true defaultStyle={seriesStyle points="0" bars="0" lines="3" color="#eb6c66"}
| render containerStyle={containerStyle opacity="0.5"}
This does a sum aggregation grouping by the order data. I'm also using the date trunc function to return data for hourly granularity.
Does this help?
1 Like
AClerk
October 19, 2020, 11:42pm
3
That is awesome!
Thanks a lot @poff !
Do you know if I can change the time interval in the visualisation?
For example to have 1 hour instead of 2?
Cheers
poff
(Poff Poffenberger)
October 20, 2020, 8:40pm
4
I'm not sure I have the perfect solution for the interval configuration on the chart but you might take a look at the axisConfig function: https://www.elastic.co/guide/en/kibana/current/canvas-function-reference.html#axisConfig_fn
AClerk
October 21, 2020, 4:17am
5
Ya, seen this already.
Ticksize - Use for number
axes only. i.e. not time/date.
Thanks!
system
(system)
Closed
November 18, 2020, 4:17am
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.