Interpolation on line graphs

Very new to Kibana, so please be patient.

I have time-series data (temperatures) in elasticsearch, which is sparse (e.g. might get 5-20 differetn values in a hour period). If I plot on a Timelion chart (using the elasticsearch 'max' function) and use the 1-hour buckets, the aggregated values are joined by lines, but if I drop to the 1-minute buckets, I just see either dots or very short lines, with no interpolation between the aggregated values. Is there any option to 'join the dots'?

I have uploaded pictures of the hourly an dminute views, and also the cardinality.
Thanks - Andrew.

Heya, while looking at this I found a bug in one of our fit functions. You should be able to pass fit=average to .es() to work around this, but it turned out there was a bug in the average fit function.

So I fixed that :slight_smile: I also added a .fit() function. So you can now add .fit(average) on to the end of your expression. There's a couple other fit functions. Here's all of them, you want average:

You'll need to remove and reinstall Timelion to get the new function. You won't lose any data.

Hi Rashid - that sounds like a good solution. I am actually using the Timelion built into the elastic cloud (trial version) , but that doesn't appear to support 'fit' yet. When might that change?


If I had to guess, at least a few weeks.

As a work around you can pass fit=nearest to .es(), eg .es(index="my*", fit=nearest) which will give you a stepped line

I must be doing something wrong - here are two 1-minute charts, 1 using points() and the other using lines() with your 'fit=nearest' attribute in .es(). I still don't get the stepped line.

Arrg, sorry, I was wrong there. Because elasticsearch is returning a bucket, but a null value, the fit algorithm isn't going to do anything. It only works in the instance that elasticsearch returns on bucket at that time. You really do need the .fit() function :frowning:

I know this isn't what you want, but if you want it to pull down to 0, instead of being null you can do something like

.es(metric="max:indoorTemp").if(eq, null, 0)

Which says, if the value at the point equals (eq) null, then set it to 0.

That's good enough for now. See screenshots for 1 hour and 1 min with pullown, and 1-min without pulldown. I assume I can't do a pulldown to the previous value?
Many thanks.

Yeah unfortunately you can't pull to the previous value, thats roughly what .fit(nearest) will do when its available in elastic cloud