Changing axis intervals

When using the CandleSeries chart, the zoom in/out functions works fine, however, the intervals on axis can be not ideal to view the graph when zoomed in.

See the image below.

Image_3606_1699664334118


On TradingView, there is an ability to change the axis interval while scrolling the mouse on the axis column, thus making the data bit more readable.

Is there a way to achieve something like this within the flutter package?


Thanks!


1 Reply 1 reply marked as answer

LP Lokesh Palani Syncfusion Team November 14, 2023 01:37 PM UTC

Hi,


We have analyzed your query. You can achieve your requirement by setting the enableAutoIntervalOnZooming property to false in the DateTimeAxis. By default, enableAutoIntervalOnZooming is set to true, so the axis intervals will change while scrolling. We have shared a code snippet and a sample for your reference. Please let us know if you need any further assistance.


Code Snippet:


           zoomPanBehavior: ZoomPanBehavior(

              enablePanning: true,

              zoomMode: ZoomMode.x,

              enableMouseWheelZooming: true,

            ),

            primaryXAxis: DateTimeAxis(

              enableAutoIntervalOnZooming: false,

            ),

 


Regards,

Lokesh P.


Attachment: chart_185401_d79f3531.zip

Marked as answer
Loader.
Up arrow icon