# Add to an array to produce 2 lines on a chart

**URL:** <https://discourse.nodered.org/t/add-to-an-array-to-produce-2-lines-on-a-chart/12814>\
**Category:** General\
**Created:** [2 July 2019 09:23 UTC](https://discourse.nodered.org/t/add-to-an-array-to-produce-2-lines-on-a-chart/12814 "2019-07-02T09:23:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dave/32/10827_2.png) [@Dave](https://discourse.nodered.org/u/Dave)\
**Post date:** [2 July 2019 09:23 UTC](https://discourse.nodered.org/t/add-to-an-array-to-produce-2-lines-on-a-chart/12814/1 "2019-07-02T09:23:22Z")

</div>

Hi am having difficulty, I want a payload that produces 2 lines on a chart here's my existing array

msg.payload={"name":'DN',"points":[{"00:00":20},{"23:59":20}]};

and I want to add say {"name":'DZ',"points":[{"00:00":25},{"23:59":25}]}; I don't necessarily need "name":'DZ',"points":  
so the array to add could just be [{"00:00":25},{"23:59":25}] part.

I tried  
msg.payload={"name":'DN',"points":[{"00:00":20},{"23:59":20},{"00:00":25},{"23:59":25}]};  
but that gave me like an inverted Z what I want is 2 separate parallel lines, any help would be appreciated

---

<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:** [2 July 2019 10:16 UTC](https://discourse.nodered.org/t/add-to-an-array-to-produce-2-lines-on-a-chart/12814/2 "2019-07-02T10:16:00Z")

</div>

Details of the required format for this is described in the section 'Line Charts' in [https://github.com/node-red/node-red-dashboard/blob/master/Charts.md](https://github.com/node-red/node-red-dashboard/blob/master/Charts.md)
