Chart Legend showing old topics

I have 2 identical flows. And they do exactly the same thing. In fact when I take my data, even the topics are the same. I figure they won't interfere with each other since they are on different flows.

I'm plotting the data, and I get this:

Where you see DC Setpoint 1, DC Actual 1, and Trigger 1 are all old topics. I don't understand why keeps showing up. Likewise with Duty Cycle 2 chart (DC Setpoint 2, DC Actual 2, and Trigger 2. trigger 1 here is also old). I've tried redeploying the project, and refreshing the browser and always shows up. If I mouse over the lines, the correct topics/data shows.

How do I clean up the legend in the chart so it doesn't display old topics anymore?

Send the chart an empty message.

msg.payload = [ ];

And it should be ok then.

The chart gets confused if you change things and don't wipe it. (Been there many times)

To be precise- send an empty array.

1 Like

Where do I place that? Rebooting my pi fixed the issue, but I'm trying to avoid this.

You put that in an inject node and then deploy. Press the inject button and the chart should be wiped.

Then any new data that comes in will be the correct colour.

So like this?
image

I'm on phone so can't make pictures but the type must be object. The icon is {} . You have string type currently.

Though @hotNipi is correct, I think if you put a space between the [ and ] it works.
But if you want to be 100% correct, I can't do more than this offering.

Got it. Its working right now. Thanks!

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