Sync Scrolling And Zoom Not Working
Hi
When updating to the latest version of the charts package the function of having multiple charts sync scroll and zoom does not work anymore any reason for this?
Hi Werner,
We have published a blog and Knowledge Base article on synchronizing multiple charts with scrolling and zooming functionality. Please refer to these resources to adjust the sample according to your needs.
Blog : Easily Synchronize Multiple Charts in Your Flutter App Like a Pro (syncfusion.com)
Knowledge base : https://support.syncfusion.com/kb/article/9939
Regards,
Thilip Chandru.
that is exactly the same thing i am using but instead of on zooming i am using onzoomend, once again it does not work with the new version for some reason
here is an example of 1 of the full charts
Hi Werner,
We have analyzed your code snippet and you have used onZoomEnd callback which will trigger after zooming action is completed. Kindly refer to this User guide for more information.
UG link: https://help.syncfusion.com/flutter/cartesian-charts/callbacks#onzoomend
And also we tried to replicate the reported issue regarding scrolling and zooming synchronization at our end. Unfortunately, we are not able to reproduce the reported issue as we are not exactly sure on what scenario the issue is replicating. So, we kindly request you to try to replicate the reported issue in the below attached test sample and revert us so that it will help us assist you in a better way.
Regards,
Thilip Chandru.
Attachment: fm_194701_(2)_b9456c4.zip
Hello
Just add autoScrollingDelta: 2, and it will break completely, and this is something that i do need to make my charts function correctly
Hi The43Joker,
To synchronize zooming, panning and auto-scrolling delta across multiple charts are achieved using zoomPanBehavior. Each chart is controlled by a DateTimeAxisController that manages the zoom factor and position of the primary X-axis. The zoomPanBehavior enables panning, pinching, double tap zooming, and selection zooming, all restricted to the X-axis. Synchronization is achieved by updating the zoom factor and position across all charts whenever one chart is zoomed or panned. This is handled with onZoomEnd callbacks based on your requirement.
Additionally, the autoScrollingDelta is dynamically adjusted via a set of buttons, allowing the user to change the auto-scrolling interval for the X-axis, effectively controlling how the charts scroll through data over specific time intervals. The use of GlobalKey ensures that each chart's state can be accessed and manipulated, maintaining synchronized behavior across all charts. We have shared a sample for your reference. You can modify the sample based on your needs.
Regards,
Thilip Chandru.
Attachment: fm_194701_(3)_1a70f6fc.zip
- 5 Replies
- 2 Participants
-
TH The43Joker
- Oct 8, 2024 06:27 AM UTC
- Oct 17, 2024 02:32 AM UTC