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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to Apply the Custom Range for CategoryAxis?

Thread ID:

Created:

Updated:

Platform:

Replies:

123385 Mar 13,2016 05:36 PM UTC Mar 14,2016 01:09 PM UTC WPF 1
loading
Tags: SfChart
Arumugam
Asked On March 13, 2016 05:36 PM UTC

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.

Sumathi Jayaraj [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;