Problem with multiple line chart

Is there any way to "lock" a topic into a certain line?

The behaviour I observed is that, after rebooting the server (for maintenance/update purposes, for instance), the line colours are assigned to first come/first served.

I am monitoring several mobile robots' battery levels and charging cycles, and I'd like them in order, to always the same colour for each one of them. However, because the update time is dynamic depending on the task each robot is doing, and because they use WiFi to connect (with different latencies) the refresh rate can be considered random every time I start the server, so it will mess up the order.

This is how it should look:

But every time the server is restarted, they appear again in random order. Most of the times, I have to cut the chart node, paste it again, connect the first one, deploy, connect the second one, deploy, and so on.

It does not seem right. Isn't there a way to lock each topic onto one specific line?

Use an inject that fires once on deploy to trigger a set of message with the correct topics (or an array) in the order you want, each with a null payload so no point is plotted but the topic order is initialised.


I'd never have thought about the null payloads. Of course, it'd be easier if the chart node allowed to associate a colour to a topic label, but since it's not possible, this will have to do.

Thanks a lot!

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