# DB2 - how to set different color lines for multiple series

**URL:** <https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [5 July 2024 12:38 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299 "2024-07-05T12:38:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [5 July 2024 12:38 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/1 "2024-07-05T12:38:20Z")

</div>

Lets say I want to have multiple series on the same chart (say temperature and humidity) I can't see in the documentation how to it.

Is it possible?

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [5 July 2024 12:51 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/2 "2024-07-05T12:51:13Z")

</div>

It should be doing that automatically? What are you seeing?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [5 July 2024 12:59 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/3 "2024-07-05T12:59:22Z")

</div>

Ahh, I see what is happening. I have two series of readings, temperature and humidity both from the same location. I set the msg.topic to 'sunroom' in both. Changing them to 'sunroom Temp' and 'sunroom Hume' and I get two colors.

Will there be an option to pick the color, blue to light blue isn't so great

 ![Screenshot 2024-07-05 at 8.58.16 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/d/2d3ac50559aa52d75c4990b25452f870e35a74d3.jpeg)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [5 July 2024 13:24 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/4 "2024-07-05T13:24:41Z")

</div>

You can select the colours like DB1

 ![chrome_screenshot_5 Jul 2024 14_23_13 BST](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/815b6f696a9ed8536da51633a29a021a851d696a.png)

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [5 July 2024 13:58 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/5 "2024-07-05T13:58:17Z")

</div>

yep, as @E1cid shared, it's the options on the `ui-chart` node already

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [5 July 2024 14:57 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/6 "2024-07-05T14:57:13Z")

</div>

Ok, I can see I can change the colors in the series colors.

So say I have two series that are sent to the chart at different times and I want temperature to be red and humidity to be blue. If I sent the temperature series is shows as red, then I send humidity and it shows as blue.

But if the humidity series is sent first it will be red and when the temperature series is send it will be blue.

So while you can select colors, you can't assign them to a particular series, you just get the color in the order of the series.

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [5 July 2024 15:03 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/7 "2024-07-05T15:03:04Z")

</div>

Great point - and one I've seen before, and thought I had an issue for, but couldn't find it - so I've opened one: [UI Chart - Ensure consistency in mapping chart series to colours · Issue #1066 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/1066)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [5 July 2024 15:05 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/8 "2024-07-05T15:05:27Z")

</div>

And I think I have a documentation update for you

 ![chart](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/e/7ea963ad767ab8419c5f6426eafc1589b1f8338d.jpeg)  
shouldn't 'button' be 'chart'?

---

<div class="post-metadata">

**Author:** ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)\
**Post date:** [5 July 2024 15:16 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/9 "2024-07-05T15:16:01Z")

</div>

You are quite right 🙂

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [5 July 2024 21:00 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/10 "2024-07-05T21:00:52Z")

</div>

@zenofmud I'm sure you've already found out, but...  
We still haven't got 2 'y axis' - left & right, on the chart where we could set the scales differently.  
Humidity can be anything up to 100%, whilst temperatures can be in single figures, which makes visualisation hard work.  
I've had this very problem since the early days of DB2, especially whilst plotting power through a triac (0-2000W) comparing it's running temperatures (0-50C).  
Hopefully more flexibility will be added in the future.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [7 July 2024 13:29 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/11 "2024-07-07T13:29:48Z")

</div>

> [@Paul-Reed](#):
>
> We still haven't got 2 'y axis' - left & right, on the chart where we could set the scales differently.

For info Paul @zenofmud I've just raised an issue for this - [Chart widget - 2 y-axis's · Issue #1070 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/1070)

---

<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:** [6 August 2024 13:30 UTC](https://discourse.nodered.org/t/db2-how-to-set-different-color-lines-for-multiple-series/89299/12 "2024-08-06T13:30:24Z")

</div>

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