# Sync series between charts

**URL:** <https://discourse.nodered.org/t/sync-series-between-charts/83297>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [29 November 2023 19:24 UTC](https://discourse.nodered.org/t/sync-series-between-charts/83297 "2023-11-29T19:24:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nygma2004](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nygma2004/32/1308_2.png) [@nygma2004](https://discourse.nodered.org/u/nygma2004)\
**Post date:** [29 November 2023 19:24 UTC](https://discourse.nodered.org/t/sync-series-between-charts/83297/1 "2023-11-29T19:24:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 November 2023 20:49 UTC](https://discourse.nodered.org/t/sync-series-between-charts/83297/2 "2023-11-29T20:49:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 December 2023 20:50 UTC](https://discourse.nodered.org/t/sync-series-between-charts/83297/3 "2023-12-13T20:50:18Z")

</div>

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