Sync series between charts

I am processing data form different sensors. As each individual data comes in aggregate the data by series, and send the results out into two charts:

  • Bar chart that shows the aggretated data for each sensor
  • Line charts shows the current data as a historgram

For the bar chart, I obviously pass all the data over in a single message, but for the line chart I pass the data as it arrives. My problem is that based on how the data comes in, gets stored, etc. the colours in the two charts do not match. A particular sensor may pick up the green colour in the bar chart, but yellow in the line chart.
Do you have a trick to keep them aligned? Documentation says: " Alternatively you can use the property series instead of topic if you prefer." But it looks like series expects a label as well, not an ID.

On startup if you send a null piece of data to each topic in turn then you can get the colours to line up as they get assign as they come in.

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