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
close icon

How to Apply the Custom Range for CategoryAxis?

I am having some calculated datapoints, that i need to append on Category Axis.

I will able to get the Current Visible Range using VisibleRanga Property 'Start' and 'End', but I cannot set the value using the same as it setter property is Internal.

Is there anyway to append the range to the Axis. 

Thanks in Advance.

1 Reply

SJ Sumathi Jayaraj Syncfusion Team March 14, 2016 01:09 PM UTC

Hi Arumugam,

Thanks for contacting Syncfusion Support.

We are able to set the minimum and maximum to the category axis as specified in the below code sample. We have prepared a sample for your requirements and it can be downloaded from the following location.

Code example[C#]:

private void Button_Click(object sender, RoutedEventArgs e)

{

    DoubleRange actualRange = (DoubleRange)(primaryAxis.GetType().GetProperty("ActualRange", BindingFlags.Instance |

                    BindingFlags.NonPublic |

                    BindingFlags.Public).GetValue(primaryAxis));

    primaryAxis.ZoomPosition = (axisMinimum - actualRange.Start) / actualRange.Delta;

    primaryAxis.ZoomFactor = (axisMaximum - axisMinimum) / actualRange.Delta;
}



Sample : MinMaxSample

Regards,
Sumathi J

Loader.
Live Chat Icon For mobile
Up arrow icon