# Dashboard v2 Chart node doesn't seem to handle larger data sets well

**URL:** https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833
**Category:** Dashboard
**Tags:** chart, dashboard-2
**Created:** [10 December 2024 22:40 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833 "2024-12-10T22:40:26Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![dudleyjosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dudleyjosh/32/105799_2.png) [@dudleyjosh](https://discourse.nodered.org/u/dudleyjosh)
#### Post date: [10 December 2024 22:40 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/1 "2024-12-10T22:40:26Z")

</div>

I rebuilt a dashboard I had running using the original node-red-dashboard v1. The dashboard retrieves data from CSV files and charts them as a timescale chart by data series. It has worked well with dashboard v1 but it is very slow and regularly causes my Node-RED instance to crash in the new dashboard v2 version?

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [11 December 2024 14:44 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/2 "2024-12-11T14:44:14Z")

</div>

Hey @dudleyjosh - this is annoyingly an issue with the underlying ChartJS library we use, and do have plans to move away from it.

We narrowed down the issue to heavy memory usage of their timestamp rendering on the x-axis, and found that it can mostly be alleviated by using the "X-Axis Format" option in the chart's config to something other than "Auto"

---

<div class="post-metadata">

### Author: ![dudleyjosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dudleyjosh/32/105799_2.png) [@dudleyjosh](https://discourse.nodered.org/u/dudleyjosh)
#### Post date: [11 December 2024 19:38 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/3 "2024-12-11T19:38:53Z")

</div>

@joepavitt I have all of my charts set to use "HH:mm:ss" for the X-Axis format, it's still an issue with my larger CSV files... but I'm just glad to know it's on the radar and being looked at. Thanks for the response.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [11 December 2024 20:15 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/4 "2024-12-11T20:15:57Z")

</div>

> [@dudleyjosh](#):
>
> larger CSV files

How many data points are you attempting to display?

---

<div class="post-metadata">

### Author: ![dudleyjosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dudleyjosh/32/105799_2.png) [@dudleyjosh](https://discourse.nodered.org/u/dudleyjosh)
#### Post date: [11 December 2024 21:27 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/5 "2024-12-11T21:27:41Z")

</div>

@Steve-Mcl some of them get pretty large... 10,000 to 15,000 rows in one of the CSV files isn't uncommon and there are (4) series pulled out of each row. That data is then filtered to separate process steps and charted on 4 to 6 separate process charts... so I would say the upper range for any one chart might be in the (5,000 points x 4 series). Frankly I was surprised that the v1 dashboard chart handled them when I originally created the dashboard... so I didn't think anything of it when I decided to transition to v2 but, v2 charts definitely don't handle that amount of data well.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [11 December 2024 21:46 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/6 "2024-12-11T21:46:15Z")

</div>

> [@dudleyjosh](#):
>
> 5,000 points

So while I agree dashboard 2 should do a better job (we'll get there) I must point out that trying to display 5000 points on a pixel space of (guessing) 1024 is superfluous (since ~80% of them are kinda overlapped)

In cases like this, I would typically average out or filter or some other kind of summarisation before attempting to display the data on a chart or gauge.

---

<div class="post-metadata">

### Author: ![dudleyjosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dudleyjosh/32/105799_2.png) [@dudleyjosh](https://discourse.nodered.org/u/dudleyjosh)
#### Post date: [12 December 2024 14:39 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/7 "2024-12-12T14:39:03Z")

</div>

@Steve-Mcl @joepavitt just to provide a frame of reference, I made a screen recording using dashboard v1 and dashboard v2 to open and chart the same extra large CSV file (over 31,000 rows of data). Both dashboards are running in the same instance of Node-RED.

The delay at the beginning for both is the file read operation of the large (8.1Mb CSV file) into Node-RED.

Dashboard v1 charts the data immediately (milliseconds), Dashboard v2 will chart the smaller chunks, but it hangs and crashes every time on the larger chunks.

You can view both screen recordings at this link for a visual comparison.

[https://photos.app.goo.gl/P3ev9xGuSv5mdkq87](https://photos.app.goo.gl/P3ev9xGuSv5mdkq87)

---

<div class="post-metadata">

### Author: ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)
#### Post date: [12 December 2024 16:02 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/8 "2024-12-12T16:02:34Z")

</div>

Just out of curiosity - does this kill the connection or the browser?  
Still chartjs but using it with the ui\_template node, slightly more optimal way.  
50,000 points per chart.

[custom-chart-test.json](https://discourse.nodered.org/uploads/short-url/wfY5qaUQyAUoWAitCXAjudxHKKh.json) (68.0 KB)

---

<div class="post-metadata">

### Author: ![dudleyjosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dudleyjosh/32/105799_2.png) [@dudleyjosh](https://discourse.nodered.org/u/dudleyjosh)
#### Post date: [12 December 2024 17:42 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/9 "2024-12-12T17:42:28Z")

</div>

The browser itself doesn't crash, but the underlying Node-RED instance does.

In this scenario, I have a local install of FlowFuse and the Node-RED instance is managed by that... so it crashes and restarts itself.

I'll take a look at the flow you shared.

Thanks.

---

<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: [12 December 2024 17:54 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/10 "2024-12-12T17:54:29Z")

</div>

> [@dudleyjosh](#):
>
> The browser itself doesn't crash, but the underlying Node-RED instance does

What reason is shown for the crash in the node red log?

---

<div class="post-metadata">

### Author: ![dudleyjosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dudleyjosh/32/105799_2.png) [@dudleyjosh](https://discourse.nodered.org/u/dudleyjosh)
#### Post date: [12 December 2024 18:20 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/11 "2024-12-12T18:20:56Z")

</div>

@Colin this is all it shows before it restarts...

 ![Screenshot 2024-12-12 at 1.19.36 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/c/cc662a205f1fb8ff9e03ef44b9a41ef71f888b5d.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [27 December 2024 15:39 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/12 "2024-12-27T15:39:33Z")

</div>

Are you running on FlowFuse?

There's a 7.5s ( default) health check that will auto restart your node-red instance.

The health check determines that the event loop is blocked (likely due to processing such a large data file) and determines your node instance to have locked up.

This 7.5 second default can be increased, however it is not recommended - you should instead improve the file loading so that it doesn't hog the event loop.

How do you load this data & do you do some kind of loop or jsonata pre-processing on the dataset? Perhaps you simply pass it through the CSV node? Can you share that portion of the flow and a sample file?

---

<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: [26 January 2025 15:39 UTC](https://discourse.nodered.org/t/dashboard-v2-chart-node-doesnt-seem-to-handle-larger-data-sets-well/93833/13 "2025-01-26T15:39:54Z")

</div>

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