apexcharts / apexcharts.js

📊 Interactive JavaScript Charts built on SVG
https://apexcharts.com
MIT License
14.23k stars 1.29k forks source link

3.53.0 introduces instability and/or browser crashes in area charts #4690

Open mrash opened 1 week ago

mrash commented 1 week ago

Description

In 3.53.0, area charts with somewhat larger number of entries (say, 2,000 or more) start to crash the browser tab making it unresponsive. This is new behavior in 3.53.0 as 3.52.0 does not have this problem. This gist has the file 'apexcharts_test.html' that reproduces this problem.

Steps to Reproduce

  1. Acquire the 'apexcharts_test.html' file from this gist.
  2. Edit the apexcharts_test.html file to replace all instances of "../../apexcharts/" with whatever the correct path is for your system. There are a total of 12 instances of this - one for the ApexCharts 'styles.css' file, and 11 for the ApexCharts 'apexcharts.js' file.
  3. With 3.52.0, observe that the entire page loads just fine - maybe slightly slow depending on how powerful your local system is.
  4. With 3.53.0, observe that the same page loads extremely slowly and frequently just causes the browser tab to become unresponsive. You may need to reload a couple of times to reproduce this. I can easily produce new versions of this testing page if more graph entries are needed for reproduction purposes on your system.

Expected Behavior

The expected behavior is the same in 3.53.0 as for 3.52.0. Note there is one minor exception which is the 'apexcharts_test.html' page does use the new "hidden" attribute for "Graph1" to hide 5 of the series by default. This feature was added in 3.53.0, so is ignored in 3.52.0. This appears to be unrelated to the main problem where the entire page becomes unresponsive.

Actual Behavior

Under 3.53.0, the page becomes unresponsive after a couple of reloads.

Screenshots

Under normal behavior (ApexCharts prior to 3.53.0), all graphs in 'apexcharts_test.html' are rendered fine. For example, "Graph4" and "Graph5" should be visible at the bottom of the page like this:

Screenshot 2024-09-08 at 3 51 03 PM

After upgrading to 3.53.0, the page becomes unresponsive. You may need to reload a couple of times to reproduce this, but eventually this will happen and the page won't render Graph4 or Graph5 (as shown above) at all:

Screenshot 2024-09-08 at 4 00 01 PM

Reproduction Link

This gist has the file 'apexcharts_test.html' that reproduces this problem. As noted above, you will need to replace all instances of "../../apexcharts/" with whatever the correct path is for your system.

brianlagunas commented 1 week ago

Please provide a working sample that does not require any modifications for it to function. We need to be able to run your sample as-is to verify it's an issue. You can modify your gist to use the CDN instead of a hard file path. This way we can download the HTML file and run it directly.