# Getting 2 different lines/datapoints via chart.js

**URL:** https://discourse.nodered.org/t/getting-2-different-lines-datapoints-via-chart-js/69208
**Category:** General
**Tags:** node-red-dashboard, function-node
**Created:** [18 October 2022 14:24 UTC](https://discourse.nodered.org/t/getting-2-different-lines-datapoints-via-chart-js/69208 "2022-10-18T14:24:08Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Natan](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@Natan](https://discourse.nodered.org/u/Natan)
#### Post date: [18 October 2022 14:24 UTC](https://discourse.nodered.org/t/getting-2-different-lines-datapoints-via-chart-js/69208/1 "2022-10-18T14:24:08Z")

</div>

Best,  
i am working through chart.js which i got here: [https://flows.nodered.org/flow/c3dc75c47323a2754f5285225bce64b5](https://flows.nodered.org/flow/c3dc75c47323a2754f5285225bce64b5).  
And it works very well if I want to show 1 graph until I want to add 2 different data points to display 2 different lines/graphs.  
Can someone help me?  
thanks in advance

---

<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: [18 October 2022 14:47 UTC](https://discourse.nodered.org/t/getting-2-different-lines-datapoints-via-chart-js/69208/2 "2022-10-18T14:47:32Z")

</div>

Does the standard dashboard chart not do what you want? I wrote the flow you linked to 6 years ago, I think the standard chart will now do everything that flow does.

---

<div class="post-metadata">

### Author: ![Natan](https://avatars.discourse-cdn.com/v4/letter/n/b38774/32.png) [@Natan](https://discourse.nodered.org/u/Natan)
#### Post date: [18 October 2022 16:48 UTC](https://discourse.nodered.org/t/getting-2-different-lines-datapoints-via-chart-js/69208/3 "2022-10-18T16:48:51Z")

</div>

In want to put an array of X and Y coordinates in the chart and i think the current chart node is time based and you cant do x and y coordinates

---

<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: [18 October 2022 20:47 UTC](https://discourse.nodered.org/t/getting-2-different-lines-datapoints-via-chart-js/69208/4 "2022-10-18T20:47:12Z")

</div>

> [@Natan](#):
>
> i think the current chart node is time based and you cant do x and y coordinates

The dashboard chart will do non-time series data. There is an example in [node-red-dashboard/Charts.md at master · node-red/node-red-dashboard · GitHub](https://github.com/node-red/node-red-dashboard/blob/master/Charts.md)

---

<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: [17 December 2022 20:47 UTC](https://discourse.nodered.org/t/getting-2-different-lines-datapoints-via-chart-js/69208/5 "2022-12-17T20:47:27Z")

</div>

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