We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Gantt Chart zoom behaviour

Could I avoid the Y axis interval change after Zoomed a gannt chart ?

after zoom -->

1 Reply

DD Dharanidharan Dharmasivam Syncfusion Team January 10, 2017 01:27 PM UTC

Hi Francesc, 

Thanks for using Syncfusion product. 

You can avoid the change of interval after zooming by using  VisibleRangeChanged event. In this event you can set the desired value to the interval of VisibleRange property, so that when the chart is zoomed also the interval will be same. Kindly find the code snippet below. 
this.chart.PrimaryYAxis.VisibleRangeChanged += PrimaryYAxis_VisibleRangeChanged; 
void PrimaryYAxis_VisibleRangeChanged(object sender, EventArgs e) 
            ((Syncfusion.Windows.Forms.Chart.ChartAxis)sender).VisibleRange.Interval = 5; 

Screenshot before zooming: 

Screenshot after zooming: 

For your reference we have attached the sample. Kindly find the sample from below location. 

Live Chat Icon For mobile
Up arrow icon