Selection zooming not working and Pinch Zoom only zoom in vertically
Hi
I am using SfCartesianChart and FastLineSeries with the following details:
There are no errors. The above is just a snippet . I am facing the following issues:
- The memory usage becomes very high with just an average number of data points
- I can't get Selection Zoom to work at all. Can't draw a box and zoom in with the mouse cursor
- When I use Pinch Zoom, only the Y axis is zoomed. X Axis remains the same.
Hope someone can help me! Thank you!
Hi Peter,
Query 1: The memory usage becomes very high with just an average number of data points
The following are the key points that can be used to boost the performance of the chart when there is a need to plot high volume data.
Load and store the required data points in the initState method itself, and then set the data points to the chart series.
Use NumericAxis or DateTimeAxis instead of CategoryAxis.
When there are large number of points to load in line series, you can use FastLineSeries series instead of LineSeries.
Instead of enabling data markers and labels when there are large number of data points, you can use Trackball to view the point information.
Set series animationDuration as 0 to disable the animation while loading large number of data points.
Use updateDataSource method while updating dynamic data points instead of calling setState. For more details refer ug - https://help.syncfusion.com/flutter/cartesian-charts/methods#updatedatasource.
Use On-demand loading while rendering large data points, it can be used to load more data to the chart when the visible range reaches the end on dragging in the chart. https://help.syncfusion.com/flutter/cartesian-charts/on-demand-loading
Query 2: I can't get Selection Zoom to work at all. Can't draw a box and zoom in with the mouse cursor
When using enableSelectionZooming and enablePanning, priority is given to enablePanning. You can use enableSelectionZooming after panning in the chart. This will help you draw a box and zoom in with the mouse cursor.
Query 3: When I use Pinch Zoom, only the Y axis is zoomed. X Axis remains the same.
We have validated your query and checked in the mobile device using the enablePinching property. It was working correctly on our end. By default, the zoomMode in ZoomPanBehavior is set to both the x and y axis. Therefore, we kindly request that you share more information with us along with screen recordings so that we can better assist you.
Regards,
Lokesh.
Hi
Thanks for the response.
Q1: I am still exploring the following:
Load and store the required data points in the initState method itself, and then set the data points to the chart series
Use updateDataSource method while updating dynamic data points instead of calling setState. For more details refer ug - https://help.syncfusion.com/flutter/cartesian-charts/methods#updatedatasource.
Use On-demand loading while rendering large data points, it can be used to load more data to the chart when the visible range reaches the end on dragging in the chart. https://help.syncfusion.com/flutter/cartesian-charts/on-demand-loading
Q2: Even I enableSelectionZooming and disable enablePanning, I still cannot draw a box and zoom with mouse cursor. I do notice every time I click on the chart, my
I encountered a different problem now. The bottom DateTime X-axis is incorrect when I zoom.
Please see the below attached video for the demo.
When Zoomed out to see the whole chart, it is ok. But when zoomed and clicked, the x-axis revert to zoomed out labels,
Attachment: vt_zoom_xaxis.mov_45a07fb1.zip
Hi Peter,
We have analyzed your query and checked the attached video. We have also checked the reported issue when the enableSelectionZooming is set to true and the enablePanning is set to false. It was working fine on our end. Unfortunately, we were not able to reproduce the reported issue. Therefore, we kindly request you to try to replicate the reported issue in the attached test sample below and revert to us so that we can assist you better.
Regards,
Lokesh.
Attachment: chart_182800_671626ab.zip
Hi Lokesh
The video showed a different issue.
It is regarding the bottom datetime axis.
When zoomed out, it is accurate. When zoom in and you click the chart, it becomes the same as zoomed out values. What creates this weird behavior?
Hi Peter,
We have checked the attached video. Please confirm whether you are using DateTimeAxis or DateTimeCategoryAxis. We have also analyzed the code snippet where you customized the Axis. Please share the code for the customized Axis. We have attached a test sample related to your issue. Have you checked the reported issue in that sample? Please check and let us know if you require any further assistance.
Regards,
Lokesh.
DateTimeAxis
DateTimeCategoryAxis
I can't find any reference to DateTimeCategoryAxis
Hi Peter,
We have attempted to reproduce the reported issue but have been unsuccessful. We are unable to proceed without additional information, and therefore cannot find a feasible solution. We kindly request that you reproduce the issue in the attached test sample so that we may better assist you.
Regards,
Lokesh.
Attachment: chart_182800_testedsample_9ed99de2.zip
- 7 Replies
- 2 Participants
-
PE Peter
- Jun 8, 2023 03:50 AM UTC
- Jun 16, 2023 07:37 PM UTC