FastLineSeries initial max y value

How can I change the initial minimum y value for a fastlineseries? Currently before any data is passed through, the y axis shows values from 0-1. I would like it to show 0-20 unless data exceeds 20 then I would like it to increase in size based on data

1 Reply

DS Durgadevi Selvaraj Syncfusion Team January 25, 2018 02:27 PM UTC

Hi Caleb, 
 
Thanks for contacting Syncfusion Support. 
 
You can achieve this requirement using ActualRangeChanged event of chart axis. In this event, you can change the axis range based on condition. 
 
Code Snippet[XAML] 
<chart:SfChart.SecondaryAxis> 
                <chart:NumericalAxis ActualRangeChanged="NumericalAxis_ActualRangeChanged"/> 
     </chart:SfChart.SecondaryAxis> 
 
 
 
Code Snippet[C#] 
  private void NumericalAxis_ActualRangeChanged(object sender, Syncfusion.UI.Xaml.Charts.ActualRangeChangedEventArgs e) 
  { 
           if ((double)e.ActualMaximum < 20) 
                e.ActualMaximum = 20; 
   } 
 
 
 
We have prepared a simple sample based on your requirement and it can be downloaded from below link, 
 
Please let us know if you have any concerns.  
Regards,  
Durgadevi S 


Loader.
Up arrow icon