Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem performance #214

Closed
LorenRodriguez opened this issue Nov 28, 2018 · 12 comments
Closed

Problem performance #214

LorenRodriguez opened this issue Nov 28, 2018 · 12 comments

Comments

@LorenRodriguez
Copy link

I am working a one a project. I need to simulate the similar chart of 25000 datapoints found on the web: https://apexcharts.com/features/. I have managed to make the chart, but the performance is much lower with 25000 datapoints compared to the chast of the web. Is it possible to achieve that performance?

Thanks

@junedchhipa
Copy link
Contributor

On the features page of ApexCharts - there are certain things which are turned off to increase performance.

  1. Animation is disabled
  2. Markers size is set to 0

If you have a similar configuration, please create a CodePen so I can look at the config of your chart and suggest some improvements if needed.

PS: SVG charts are generally slower if there are thousands of data-points. The goal of ApexCharts is not to render millions of data-points as that is not achievable with SVG elements easily. WebGL can help if you want to achieve good performance with a lot of data-points (WebGL is not supported in ApexCharts yet)

@LorenRodriguez
Copy link
Author

LorenRodriguez commented Nov 28, 2018

I have disabled Animation and performance is good. Thanks.

@mestaritonttu
Copy link
Contributor

Disabling animations when they give no benefit is for sure a good idea (I prefer never to use them), but I thought I would share what I found in an SVG.js issue: "3.0 version will have much better performance on animation" (3.0 was released in Dec 2018).

@junedchhipa
Copy link
Contributor

@mestaritonttu Thanks for the suggestion. I wanted to upgrade to 3.0, but the final size of ApexCharts became much larger (increased by ~ around 20%) after I tried the upgrade.
Also, I have manually tweaked some code of svg.js to prevent bugs while integrating ApexCharts in various 3rd party libraries.

Nonetheless, I will keep track of SVG.js as that is the core library ApexCharts depends on, and in future, I will upgrade to the latest version after weighing pros and cons.

@MACscr
Copy link

MACscr commented Mar 30, 2019

What is a reasonable number of data points to use as a limit?

@leeoniya
Copy link

leeoniya commented Nov 5, 2019

you may want to consider https://github.com/leeoniya/uPlot

@mestaritonttu
Copy link
Contributor

you may want to consider https://github.com/leeoniya/uPlot

Nah, it uses Canvas instead of SVG, so I doubt users of ApexCharts would consider it.

@leeoniya
Copy link

leeoniya commented Nov 5, 2019

for users who insist on SVG, then obviously not. but those looking to render 25,000 data points would be doing themselves a disservice by dismissing libs purely based on technology, since Canvas & WebGL is where the performance is.

anyways, never hurts to be aware of additional options :)

@AliRezaBeigy
Copy link

for me, disabling dataLabels help me too much

dataLabels: {
  enabled: false
}

@Mon1k
Copy link

Mon1k commented Jan 14, 2022

I uses this:

  1. Disable animation
    animations: {
    enabled: false
    },
  2. Disable datalable
    dataLabels: {
    enabled: false
    },
  3. Stroke is staight
    stroke: {
    width: 2,
    curve: 'straight'
    },
  4. The strongest acceleration replace xaxis type "category" on "datetime"
    before:
    xaxis: {
    type: 'category'
    after
    xaxis: {
    type: 'datetime'

@sayinmehmet47
Copy link

Unfortunately since I have more than 25000 data, eventhough I made some configuration in options it doesnt work. So I used highcharts library. It is using Canvas instead of SVG. Take a look at my repo and with live example.

https://github.com/sayinmehmet47/frontend-timeserieschallange

@anuragg33
Copy link

any one found solution.I want to show datalabels for some series. but if i enabled the data lable chart taking too much time to load.Also zoom in ,zoom out taking too much time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants