I have a dynamic chart with A LOT of datapoints (in specific scenarios upwards of 500.000 and more). After a few seconds ther render task will use 100% CPU and my chart is lagging behind.
Can you kindly create a JSFiddle reproducing the issue and share it with us so that we can look into code, understand the scenario better and help you out?
Now I need to render a different granularity of datapoints. For example: In the normal view I would like to render each 10th datapoint and when I zoom in, I would like to render each datapoint.
Is there a possibility to do that with CanvasJS? I already tried to switch out the datapoints when switching to zoom but somehow I didn’t get that to work…
You can update the dataPoint on zooming with the help of rangeChanging event as shown in this JSFiddle.
—-
Manoj Mohan
Team CanvasJS
CanvasJS supports exporting chart as an image or to print it. To export multiple charts rendered within a page or to export chart along with extra content, you can use html2canvas as shown in this JSFiddle. Please refer this article for more information.
—-
Manoj Mohan
Team CanvasJS
Thanks for your suggestion. We will improve it in future versions.
—-
Manoj Mohan
Team CanvasJS
Do you mean printing chart? If so, you can use print method.
If you are looking for something else, can you kindly create a JSFiddle demonstrating your use-case and share it with us so that we can understand your requirement better and help you out?
From what we have observed, sometimes things get delayed mostly when we are not able to reproduce the issue or not able to understand the exact requirements or the solution that we provide may not work properly due to the variation in chart-options being used by you and us.
Having a sample project helps us in figuring out the issue and suggesting an appropriate solution accordingly.
—-
Manoj Mohan
Team CanvasJS
Please refer to this Stack Overflow thread for more information on saving page as html file.
—-
Manoj Mohan
Team CanvasJS
Please take a look at this gallery example to render chart with data from database in ASP.NET MVC. You can also download ASP.NET MVC sample from our download page.
If this doesn’t help you resolve the issue you are facing, kindly create sample project reproducing the issue along with sample database and share with us over Google-Drive or Onedrive so that we can run it locally to understand your scenario better and help you out.
—-
Manoj Mohan
Team CanvasJS
The issue seems to be happening when labels are being used. Removing labels should work fine in your case as shown in this JSFiddle.
Thanks for reporting the use-case and we will look into it further.
Considering this thread as duplicate of Interval in line chart and hence closing the same.
—-
Manoj Mohan
Team CanvasJS
Can you kindly create a sample project reproducing the issue you are facing on adding CanvasJS in MainLayout.vue and share it over Google-Drive or Onedrive so that we can run it locally to understand your scenario better and help you out?
—-
Manoj Mohan
Team CanvasJS
Saurabh,
As of now, it is not possible to align axisY of multiple charts on zooming and panning.
—-
Manoj Mohan
Team CanvasJS
Yes, the dataPoint(12, 300) will be displayed irrespective of the chart width and other dataPoints with y value less than 100 might get overlap with each other in such scenarios.
—-
Manoj Mohan
Team CanvasJS
As mentioned earlier, we don’t filter or skip any dataPoint values to render chart. Consider this JSFiddle for an example. In the fiddle, you can observe that the dataPoints values { x: 1, y: 1 }, { x: 2, y: 2 }, { x: 3, y: 3 } are displayed in same pixel vertically. i.e if multiple dataPoints with different y-values end up sharing the same pixel co-ordinate vertically. In the case of dataPoints with same y value & different x value, it ends up overlapping each other and gets rendered in same pixel co-ordinate vertically & horizontally. Similarly, for same x and y values, dataPoints will be displayed one top of another (overlaps one on top of other).
In the shared example, even when 1000 datapoints are rendered within 600px chart width, you can clearly observe that we don’t group or skip any dataPoint irrespective of a large number of dataPoints to be displayed in the limited width available.
—-
Manoj Mohan
Team CanvasJS
Glad that you have figured it out. Thanks for sharing the solution it will be helpful to others.
—-
Manoj Mohan
Team CanvasJS
We don’t manipulate or skip any dataPoint values to render chart in a screen with lesser pixels. However, dataPoints might get overlapped with each other in case there is huge number of dataPoints compare to available pixels to display. For e.g., let’s say screen with 1000 pixels and chart with dataPoints ranging from 1 to 10000, there might be a possibility that dataPoints with values 10-19 be overlapped with each other and render in one pixel. Moreover, for such scenarios you can set zoomEnabled to true and zoom into a region of interest.
—-
Manoj Mohan
Team CanvasJS
Thanks for your feedback. We will look into this feature in our future releases.
—-
Manoj Mohan
Team CanvasJS