Kibana: line color based on threshold


(Marco Di Munno) #1

Hi all,

I'm trying to make up a dashboard with a line that records the temperature received by a IoT device; I need the line becomes red when the temperature received is higher than 28. I've tried different solutions with timelion and visual builder but actually the dashboard displays separated lines. How can I get that?
Following one of tests that I tried:

Thanks


(Bhavya R M) #2

HI Marco,

I am pretty sure this is not possible right now. But I am tagging @timroes our viz lead to check and see if he can help.

Also can you please create an enhancement request here? https://github.com/elastic/kibana/issues

Thanks,
Bhavya


(Tim Roes) #3

Hi Marco,

you unfortunately cannot do that with a line chart. You already went the right approach, but as you see the capped out line will always be visible and kind of cut of the red line, which is I assume not the desired behavior. The only way you could achieve that, is by using a bar chart instead. I've written a short example in this blog post about how to make that kind of conditionally colored bar charts. In contrast to line charts, they work, because the bar will always be covered and hiddened behind the other bar, which does not work with the line chart.

Cheers,
Tim


(system) #4

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