# What function to set for my Array to be defined for Chart?

**URL:** <https://discourse.nodered.org/t/what-function-to-set-for-my-array-to-be-defined-for-chart/69447>\
**Category:** Dashboard\
**Tags:** chart\
**Created:** [23 October 2022 04:09 UTC](https://discourse.nodered.org/t/what-function-to-set-for-my-array-to-be-defined-for-chart/69447 "2022-10-23T04:09:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EidWanna](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@EidWanna](https://discourse.nodered.org/u/EidWanna)\
**Post date:** [23 October 2022 04:09 UTC](https://discourse.nodered.org/t/what-function-to-set-for-my-array-to-be-defined-for-chart/69447/1 "2022-10-23T04:09:49Z")

</div>

![2022-10-23 11_18_14-Node-RED](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/6/262aab45e89e53a11f4be3b4882321fac993bb22.png)  
 ![2022-10-23 12_09_10-Node-RED](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/c/9cdd8274cb0c7a1e9909120538d717d43970477d.png)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [23 October 2022 05:55 UTC](https://discourse.nodered.org/t/what-function-to-set-for-my-array-to-be-defined-for-chart/69447/2 "2022-10-23T05:55:11Z")

</div>

See [documentation](https://github.com/node-red/node-red-dashboard/blob/master/Charts.md)

> For line charts an example is given below

```auto
[{
"series": ["A", "B", "C"],
"data": [
    [{ "x": 1504029632890, "y": 5 },
     { "x": 1504029636001, "y": 4 },
     { "x": 1504029638656, "y": 2 }
    ],
    [{ "x": 1504029633514, "y": 6 },
     { "x": 1504029636622, "y": 7 },
     { "x": 1504029639539, "y": 6 }
    ],
    [{ "x": 1504029634400, "y": 7 },
     { "x": 1504029637959, "y": 7 },
     { "x": 1504029640317, "y": 7 }
    ]
],
"labels": [""]
}]

```

This is the exact format to use to make it work.

---

<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:** [22 November 2022 05:55 UTC](https://discourse.nodered.org/t/what-function-to-set-for-my-array-to-be-defined-for-chart/69447/3 "2022-11-22T05:55:55Z")

</div>

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