# Chart node does not take data as expected

**URL:** <https://discourse.nodered.org/t/chart-node-does-not-take-data-as-expected/90891>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [11 September 2024 15:54 UTC](https://discourse.nodered.org/t/chart-node-does-not-take-data-as-expected/90891 "2024-09-11T15:54:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhiteLion](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/whitelion/32/12266_2.png) [@WhiteLion](https://discourse.nodered.org/u/WhiteLion)\
**Post date:** [11 September 2024 15:54 UTC](https://discourse.nodered.org/t/chart-node-does-not-take-data-as-expected/90891/1 "2024-09-11T15:54:51Z")

</div>

Hiho,

while switching from DB1 chart node to DB2 chart node I notice that it does not "eat" the same data to draw the the chat. What is wrong ? Thx!

DB1 chart node:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/4/e4ab1a5bf679c93392a1e5fc1c03ee260e0a4893.png)

DB2 chart node:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/8/58aaca0b3544fba50c1b23e6ef90037a5e3e3f27.png)

Data that is send to the chart node (only small example):

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/8/e8e81472196172ec3a2ba756a3d351040a35521d.png)

DB1 views correct like so:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f2697e52e67597baad41cfbd192d8dcd1df9d51a.png)

DB 2 does not:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/e/be2e1d73c5a5a3782a162819a99cf8a9377f41cf.png)

---

<div class="post-metadata">

**Author:** ![RandomSporadicProjs](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@RandomSporadicProjs](https://discourse.nodered.org/u/RandomSporadicProjs)\
**Post date:** [11 September 2024 16:27 UTC](https://discourse.nodered.org/t/chart-node-does-not-take-data-as-expected/90891/2 "2024-09-11T16:27:31Z")

</div>

I've been doing this today too. Actually it turns out to be much better than the old way for database derived data.

Have a look at this link for more information on getting your data to display.

> [@Chart Dashboard 2.0](https://discourse.nodered.org/t/chart-dashboard-2-0/88757/2):
>
> Dashboard 2.0 is not backward compatible. One of the joys, and big changes we made for of Dashboard 2.0, is that you don't need to separate and pre-format your data. Instead of having multiple arrays, all duplicating data as you have it currently, you can just use the output from SQL directly, and have a single array containing the relevant data in each object, e.g: [{ "DateTime": "2024-06-17 14:23:24" "Carbon Monoxide": 1 "Oxygen": 20, "Light Intensity": 134, "Temperature…

---

<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:** [25 September 2024 16:28 UTC](https://discourse.nodered.org/t/chart-node-does-not-take-data-as-expected/90891/3 "2024-09-25T16:28:13Z")

</div>

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