How can I fix Y-Axis when I scroll?

Hi.

I have a int(x) / double(y) SfCartesianChart.

I'm currently using SFCartesianChart wrapped with SinglechildScrollveiw widget.


Is it possible when scrolling the chart screen, can i fix the Y-axis and scroll only the screen where the chart data is drawn?

Or, is there a chart that implements this function?


Thanks for your work.




3 Replies 1 reply marked as answer

YG Yuvaraj Gajaraj Syncfusion Team May 9, 2022 06:54 PM UTC

Hi Minjae,


Greetings from Syncfusion. Currently, we do not have any built-in scroll bar support for the chart. However, you can achieve your requirement with the help of visibleMaximum and zoomPanBehavior properties. Here you need to set the visibleMinimum and visibleMaximum properties to specify how much data need to be visible in the viewport. Then enable the panning in zoomPanBehavior to pan and show the rest of the data. Here you can control the zooming and panning based on the axis with the help of the zoomMode property in zoomPanBehavior. Here you can zoom/pan the chart in the horizontal direction by specifying the zoomMode as ZoomMode.x. We have attached the sample below for your reference.


UG: https://help.syncfusion.com/flutter/cartesian-charts/zoom-pan#panning


Regards,

Yuvaraj.


Attachment: f174891_d46675a0.zip

Marked as answer

MK MinJae Kim replied to Yuvaraj Gajaraj May 10, 2022 03:12 PM UTC

OMG.. This is the function I really wanted!


Thank you for your reply


Thanks,

Yuvaraj



YG Yuvaraj Gajaraj Syncfusion Team May 12, 2022 02:11 PM UTC

Hi Minjae,


Thanks for the update. We are always happy to assist you, if you have any further queries, please get back to us.


Regards,

Yuvaraj.


Loader.
Up arrow icon