Clear chart on new data set

I'm using a chart node to show forecasted weather data, so I'm using the timestamps that come with openweathermap. This actually works well, but over time the forecast changes and the chart node tries to chart both the old and new data making it "weird".

How would I go about clearing the chart (sending a blank array) JUST before the new data set?

Here's my current flow:

Yes, I would add a trigger node after the mqtt node. Set to output a blank array on first trigger event, linked to your charts. Then send second trigger event to the second output, sending the original msg object to your original flow after a short delay.

1 Like

That works perfectly. Thanks!

While I've mostly gotten the hang of payloads and messages it's still sometime difficult to not think like a procedural program.

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