# Line chart is not working

**URL:** https://discourse.nodered.org/t/line-chart-is-not-working/65963
**Category:** Dashboard
**Tags:** node-red-dashboard
**Created:** [3 August 2022 08:31 UTC](https://discourse.nodered.org/t/line-chart-is-not-working/65963 "2022-08-03T08:31:27Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![FatimaSeemab](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fatimaseemab/32/63515_2.png) [@FatimaSeemab](https://discourse.nodered.org/u/FatimaSeemab)
#### Post date: [3 August 2022 08:31 UTC](https://discourse.nodered.org/t/line-chart-is-not-working/65963/1 "2022-08-03T08:31:28Z")

</div>

Hi!! I am trying to display a line chart here but it is not showing anything can anyone please help me? What am I doing wrong?  
This is the snippet of output where I want to display my line chart

 ![Screenshot 2022-08-03 at 13.22.59](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bddd597aa9b9ba4af85a916cab3b63a3a1e8b196.png)  
And  
below is the payload I am giving to the chart node  
 ![Screenshot 2022-08-03 at 13.31.08](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/b/8bc7dc682f0f7efd15d1de9fe82a89c72a345480.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: [3 August 2022 11:20 UTC](https://discourse.nodered.org/t/line-chart-is-not-working/65963/2 "2022-08-03T11:20:08Z")

</div>

If you look at the `Help` tab in the sidebar while clicking on the ui-chart node, you will find this:

> See [this information](https://github.com/node-red/node-red-dashboard/blob/master/Charts.md) for how to pre-format data to be passed in as a complete chart.

You might want to follow that link and read what it says

---

<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: [3 August 2022 13:32 UTC](https://discourse.nodered.org/t/line-chart-is-not-working/65963/3 "2022-08-03T13:32:09Z")

</div>

Are you trying to pre-fill a chart or are you just trying to add data to a chart in real time so that it draws the line as new data comes in?

---

<div class="post-metadata">

### Author: ![FatimaSeemab](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fatimaseemab/32/63515_2.png) [@FatimaSeemab](https://discourse.nodered.org/u/FatimaSeemab)
#### Post date: [4 August 2022 05:47 UTC](https://discourse.nodered.org/t/line-chart-is-not-working/65963/4 "2022-08-04T05:47:48Z")

</div>

> [@Colin](#):
>
> pre-fill a chart or are you just trying to add data to a chart in real time so that it draws the line as new data comes in

The data is coming from a database

---

<div class="post-metadata">

### Author: ![FatimaSeemab](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fatimaseemab/32/63515_2.png) [@FatimaSeemab](https://discourse.nodered.org/u/FatimaSeemab)
#### Post date: [4 August 2022 05:49 UTC](https://discourse.nodered.org/t/line-chart-is-not-working/65963/5 "2022-08-04T05:49:19Z")

</div>

Yes, it is according to the link and the same format data is working for many other flows of mine

---

<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: [4 August 2022 08:28 UTC](https://discourse.nodered.org/t/line-chart-is-not-working/65963/6 "2022-08-04T08:28:09Z")

</div>

Reduce the amount of data to just three points and show it in a debug node, hover over the `array[1]` line and you should see little buttons appear at the right hand side. Hover over those and one will show Copy Value. Click that and paste the data here, using the `</>` button when pasting 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: [3 September 2022 08:29 UTC](https://discourse.nodered.org/t/line-chart-is-not-working/65963/7 "2022-09-03T08:29:03Z")

</div>

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