Can i config default value with Metic in Timelion?

Hi. i'm using Timelion in Kibana 6.4.1

im using 'metric:avg'.

if documents doesn't exist at a certain time, Timelion doesn't show at that time.

i want to show all of value about each interval time including that doesn't exist documents at a certain time.

can i config '0' as default Y-Axis value?

A config of '0' isn't strictly possible, but you can use the fit function to have Timelion interpolate missing data points:

I was able to get what you want by essentially running the expression twice, but that will not be very performant. The second time is within an if function call that translates anything that isn't greater than 0 to 0:

.es(index='hass-events-*', timefield='@timestamp', metric='avg:attributes.battery').if(operator='gt', if=0, then=.es(index='hass-events-*', timefield='@timestamp', metric='avg:attributes.battery'), else=0)

thx for your response :smile:

i will try this.

by the way, can i using this feature in Visual Builder??

Timelion and Visual Builder is look similar and both are good visualize.

but Visual Builder look good a little for me

i cant find similar property like 'fit' or 'if' in Visual Builder

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.