Chart with one two-color line (battery charging)


I want to display a chart which shows the (dis-)charging of the battery of my (Linux) notebook as xx% full.


I'm filling the chart with a function node.

BTW: I get the result from a exec node, which calls acpi -bi | head -1.

But I want the line while discharging in orange and the (same?) line while charging in green.

So I'm just changing the topic

if (battery.payload)
{werte.topic = "discharge"}
{werte.topic = "charge"}

But the second line always make a straight line to the point, where I change the charge state.
How do I generate a single line with different colors for charging and discharging?

Simple answer is you can’t. But you are almost there. If you send a null to each topic it will force a break in the line so you can avoid the line filling in.

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