# Multiple values in bar chart

**URL:** <https://discourse.nodered.org/t/multiple-values-in-bar-chart/89129>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [30 June 2024 23:46 UTC](https://discourse.nodered.org/t/multiple-values-in-bar-chart/89129 "2024-06-30T23:46:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [30 June 2024 23:46 UTC](https://discourse.nodered.org/t/multiple-values-in-bar-chart/89129/1 "2024-06-30T23:46:39Z")

</div>

I'm struggling with making the transition from DB1 to DB 2. I'm trying to generate a bar chart for a single series similarly to what I was doing in DB 1. I've tried to go back to basics with a variation of the DB 2 examples and can't even get a value displayed. I know it's something obvious but sure can't get things to work. Any help would be appreciated!

Function node into chart:

```auto
msg = {
    "payload": [
        {
            "category": "bar-1",
            "value": 34
        },
       {
            "category": "bar-1",
            "value": 17
        }
    ]
}
return msg;

```

 ![ChartNode](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/6/a6b975991808812d971c4bb25d634c78003075d7.png)  
 ![Chart](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/e/5ea9a943b77575c592cdd02f4d87729e4d44ff42.png)

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [1 July 2024 00:07 UTC](https://discourse.nodered.org/t/multiple-values-in-bar-chart/89129/2 "2024-07-01T00:07:21Z")

</div>

This is what I'm trying to replicate from DB1:

 ![DB1 Series](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/a/3abc8789d6438735bb46a8d77fe0b583bb3dbd83.png)  
 ![DB1 Chart](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/5/75d8ea56db0036669e444c08c5cb9ea8a326d2ec.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:** [1 July 2024 06:17 UTC](https://discourse.nodered.org/t/multiple-values-in-bar-chart/89129/3 "2024-07-01T06:17:46Z")

</div>

Hi, I'm the lead dev on Dashboard, thanks for your question. Only on my phone at the moment, but I actually can't see anything wrong with what you've constructed here.

I'll be able to get to my laptop within the hour, and I can take a proper look

---

<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:** [1 July 2024 07:01 UTC](https://discourse.nodered.org/t/multiple-values-in-bar-chart/89129/4 "2024-07-01T07:01:48Z")

</div>

Okay, so we definitely have some issues in the `ui-chart` node. A quick summary of the problems I can see:

### Lack of Support

- Currently, we're limited to "Categorical" axes for Bar Charts, i.e. a Histogram. What you've got has a linear/numerical x-axis, which we don't currently support. I've opened an issue and made it a "High Priority" - [Support "Linear" & "Timescale" x-axis on a bar chart · Issue #1045 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/1045)

### Bugs

- The Dashboard is requiring a refresh each time I send it data and only do a "Modified Nodes" deploy. This [issue](https://github.com/FlowFuse/node-red-dashboard/issues/277) appears to have been opened a long time ago, and I completely missed it.
- Giving the `ui-chart` a series of a static string causes unpredictable behaviour. I can't follow the logic atm of _how_ it's deciding to plot what it is plotting.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 July 2024 08:59 UTC](https://discourse.nodered.org/t/multiple-values-in-bar-chart/89129/5 "2024-07-01T08:59:43Z")

</div>

While you are in there you might like to sort out [Stale data not being weeded from chart · Issue #755 · FlowFuse/node-red-dashboard · GitHub](https://github.com/FlowFuse/node-red-dashboard/issues/755) too.

---

<div class="post-metadata">

**Author:** ![Glake01](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/glake01/32/5950_2.png) [@Glake01](https://discourse.nodered.org/u/Glake01)\
**Post date:** [1 July 2024 16:31 UTC](https://discourse.nodered.org/t/multiple-values-in-bar-chart/89129/6 "2024-07-01T16:31:28Z")

</div>

Thank you Joe for the update. I'll stay tuned 🙂

---

<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:** [31 July 2024 16:31 UTC](https://discourse.nodered.org/t/multiple-values-in-bar-chart/89129/7 "2024-07-31T16:31:53Z")

</div>

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