Line chart not showing gap on 'null'

Hi everyone,

I have a setup whereby an MQTT node is subscribed to a remote site and getting a temperature value. I show the temperature on a line chart.

Once in a while the communications drop out and come back. I want to show the loss of comms as a gap in the line chart.

At the moment I monitor the status of the MQTT node and if it changes state from 'connnected' to something else, i send a message to the line chart with payload 'null'. According to this; https://github.com/node-red/node-red-dashboard/blob/master/Charts.md that should greate 'gaps'. but it doesn't. When MQTT comes back, the line chart just draws an interpolation from the last value to the new one and simply ignores the 'null'. What am I missing here?

Thanks
Koen

Just a guess but do you have msg.topic same for both branches going to the chart node?

And what exactly is in the function node ?

Genius!!

Of course the topic was different - it came from the status node..... Somehow that didn't trigger me after reading the manual a number of times.

Thank you.

1 Like

The function node was just:

Annotation 2020-06-19 214849

Now I added a force on the topic and it works.

1 Like