# Dashboard 2 ui-chart data format - no data key names

**URL:** <https://discourse.nodered.org/t/dashboard-2-ui-chart-data-format-no-data-key-names/96769>\
**Category:** Dashboard\
**Tags:** dashboard-2, ui-chart\
**Created:** [26 April 2025 17:11 UTC](https://discourse.nodered.org/t/dashboard-2-ui-chart-data-format-no-data-key-names/96769 "2025-04-26T17:11:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rollem1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rollem1/32/55324_2.png) [@Rollem1](https://discourse.nodered.org/u/Rollem1)\
**Post date:** [26 April 2025 17:11 UTC](https://discourse.nodered.org/t/dashboard-2-ui-chart-data-format-no-data-key-names/96769/1 "2025-04-26T17:11:06Z")

</div>

Hi,

I am migrating from dashboard 1 to dashboard 2. Like others I had to format the incoming data for dashboard 1. I've read in other posts that this is no longer needed. The issue I have is that my data does not have key names to reference.

How should I set up my chart node or reformat my data so that I can visualise it?

```auto
{"status":"OK","name":"Smart Meter, electricity consumption","resourceTypeId":"ea02304a-2820-4ea0-8399-f1d1b430c3a0","resourceId":"e45cbfcf-92fe-49c1-8c2a-fe0319c513e3","query":{"from":"2025-01-02T00:00:00","to":"2025-02-02T00:00:00","period":"P1D","function":"sum"},"data":[[1735776000,19.494],[1735862400,18.592],[1735948800,18.976],[1736035200,20.121],[1736121600,19.906],[1736208000,19.596],[1736294400,16.312],[1736380800,19.35],[1736467200,19.234],[1736553600,20.813],[1736640000,21.133],[1736726400,14.791],[1736812800,15.17],[1736899200,14.121],[1736985600,15.14],[1737072000,13.847],[1737158400,13.364],[1737244800,22.012],[1737331200,16.174],[1737417600,18.724],[1737504000,15.015],[1737590400,14.953],[1737676800,22.999],[1737763200,12.563],[1737849600,15.315],[1737936000,15.327],[1738022400,13.219],[1738108800,19.611],[1738195200,14.962],[1738281600,18.78],[1738368000,17.477],[1738454400,0.311]],"units":"kWh","classifier":"electricity.consumption"}

```

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0d461ccaad09609b5fc9ca4d8018592981df77d5.png)

---

<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:** [26 April 2025 17:23 UTC](https://discourse.nodered.org/t/dashboard-2-ui-chart-data-format-no-data-key-names/96769/2 "2025-04-26T17:23:35Z")

</div>

There are some tutorials at [Getting Started | Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/getting-started.html) you should take a look at.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [26 April 2025 18:06 UTC](https://discourse.nodered.org/t/dashboard-2-ui-chart-data-format-no-data-key-names/96769/3 "2025-04-26T18:06:48Z")

</div>

You will need to convert the data and put it in payload

in a function, before the chart:

```js
msg.payload = msg.payload.data.map(e => {
    return {
        x: new Date(e[0] * 1000).toLocaleDateString(),
        y: e[1],
    }
})
return msg;

```

Chart setup:

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

Result:

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

---

<div class="post-metadata">

**Author:** ![Rollem1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rollem1/32/55324_2.png) [@Rollem1](https://discourse.nodered.org/u/Rollem1)\
**Post date:** [26 April 2025 23:37 UTC](https://discourse.nodered.org/t/dashboard-2-ui-chart-data-format-no-data-key-names/96769/4 "2025-04-26T23:37:45Z")

</div>

Thank you Steve

That works perfectly.

Jon

---

<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:** [10 May 2025 23:38 UTC](https://discourse.nodered.org/t/dashboard-2-ui-chart-data-format-no-data-key-names/96769/5 "2025-05-10T23:38:10Z")

</div>

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