Assign axis range manually

Hi,

I currently have two separate charts in separate grids that both need to have the same max and min for the y-axis. Setting the max won't solve since one chart may have a much smaller maximum value than the other. Is there are way to see these values manually? 

3 Replies

DS Durgadevi Selvaraj Syncfusion Team February 13, 2018 01:24 PM UTC

Hi Shermin, 
 
Thanks for contacting Syncfusion Support. 
 
If your requirement is to get the range which is calculated from data then please use ActualRangeChanged event of ChartAxis. You can get the minimum and maximum values through ActualMinimum and ActualMaximum properties from event args and also, you can set the value for the VisibleMinimum and VisibleMaximum properties to update the minimum and maximum of respective axis in Chart. 
 
Code Snippet[XAML] 
<chart:SfChart.SecondaryAxis> 
                <chart:NumericalAxis ActualRangeChanged="NumericalAxis_ActualRangeChanged"/> 
</chart:SfChart.SecondaryAxis> 
 
Code Snippet[C#] 
private void NumericalAxis_ActualRangeChanged(object sender,ActualRangeChangedEventArgs e) 
{ 
            var minimum = e.ActualMinimum; 
            var maximum = e.ActualMaximum; 
            var interval = e.ActualInterval; 
  } 
 
 
You can also refer our UG documentation link to know more about events in chart Axis, 
 
We hope that the provided solution will help you to achieve your requirement. If not, please revert us some more details about your requirement and it would be more helpful for us to provide a solution based on that. 
 
Regards,  
Durgadevi S 



SS Sean Schellinger February 13, 2018 06:43 PM UTC

That solved it. Thanks!


DS Durgadevi Selvaraj Syncfusion Team February 14, 2018 04:11 AM UTC

Hi Shermin, 
 
We glad that the issue has been resolved. 
 
Please get back to us if you need any further assistance on this. 
 
Regards, 
Durgadevi S 


Loader.
Up arrow icon