# Data into Line chart

**URL:** <https://discourse.nodered.org/t/data-into-line-chart/67889>\
**Category:** General\
**Created:** [18 September 2022 14:52 UTC](https://discourse.nodered.org/t/data-into-line-chart/67889 "2022-09-18T14:52:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjez66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kjez66/32/67939_2.png) [@kjez66](https://discourse.nodered.org/u/kjez66)\
**Post date:** [18 September 2022 14:52 UTC](https://discourse.nodered.org/t/data-into-line-chart/67889/1 "2022-09-18T14:52:29Z")

</div>

Hi,

I will been putting the last hours of trying to get the line chart working ☹

I some data in the msg.payload which then is sent to the line chart element but it doesnt render the chart, what am I doing wrong? Because as you can see I have included: series, data and label)

The data in the payload:  
{"series":["Today"],"data":[[{"x":1663452000000,"y":44.940000000000005},{"x":1663455600000,"y":44.39},{"x":1663459200000,"y":37.830000000000005},{"x":1663462800000,"y":44.529999999999994},{"x":1663466400000,"y":53.75},{"x":1663470000000,"y":50.480000000000004},{"x":1663473600000,"y":41.13},{"x":1663477200000,"y":85.24000000000001},{"x":1663480800000,"y":108.33999999999999},{"x":1663484400000,"y":99.42},{"x":1663488000000,"y":105.62},{"x":1663491600000,"y":105.5},{"x":1663495200000,"y":100.15},{"x":1663498800000,"y":55.57},{"x":1663502400000,"y":51.35999999999999},{"x":1663506000000,"y":53.690000000000005},{"x":1663509600000,"y":72.48},{"x":1663513200000,"y":117.97},{"x":1663516800000,"y":253.60999999999999},{"x":1663520400000,"y":279.75},{"x":1663524000000,"y":290.72},{"x":1663527600000,"y":253.95},{"x":1663531200000,"y":204.36},{"x":1663534800000,"y":142.65}]],"labels":[""]}

---

<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:** [18 September 2022 15:06 UTC](https://discourse.nodered.org/t/data-into-line-chart/67889/2 "2022-09-18T15:06:42Z")

</div>

Your payload need to be an array

```auto
[
{"series":["Today"],"data":[[{"x":1663452000000,"y":44.940000000000005},{"x":1663455600000,"y":44.39},{"x":1663459200000,"y":37.830000000000005},{"x":1663462800000,"y":44.529999999999994},{"x":1663466400000,"y":53.75},{"x":1663470000000,"y":50.480000000000004},{"x":1663473600000,"y":41.13},{"x":1663477200000,"y":85.24000000000001},{"x":1663480800000,"y":108.33999999999999},{"x":1663484400000,"y":99.42},{"x":1663488000000,"y":105.62},{"x":1663491600000,"y":105.5},{"x":1663495200000,"y":100.15},{"x":1663498800000,"y":55.57},{"x":1663502400000,"y":51.35999999999999},{"x":1663506000000,"y":53.690000000000005},{"x":1663509600000,"y":72.48},{"x":1663513200000,"y":117.97},{"x":1663516800000,"y":253.60999999999999},{"x":1663520400000,"y":279.75},{"x":1663524000000,"y":290.72},{"x":1663527600000,"y":253.95},{"x":1663531200000,"y":204.36},{"x":1663534800000,"y":142.65}]],"labels":[""]}
]

```

so you need to put [] around it as shown above.

---

<div class="post-metadata">

**Author:** ![kjez66](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kjez66/32/67939_2.png) [@kjez66](https://discourse.nodered.org/u/kjez66)\
**Post date:** [18 September 2022 17:00 UTC](https://discourse.nodered.org/t/data-into-line-chart/67889/3 "2022-09-18T17:00:40Z")

</div>

Awesome, thanks E1cid, that did it! 😃

---

<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:** [2 October 2022 17:01 UTC](https://discourse.nodered.org/t/data-into-line-chart/67889/4 "2022-10-02T17:01:04Z")

</div>

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