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

Fixing a Y-axis range at one end but not the other

Thread ID:

Created:

Updated:

Platform:

Replies:

100850 Sep 9,2011 02:20 PM UTC Sep 13,2011 05:02 PM UTC WPF 1
loading
Tags: Chart
David Turner
Asked On September 9, 2011 02:20 PM UTC

Hi

Is it possible to fix one end of a range to a particular value, but let the other be automatically determined?

In particular, I have some charts where the Y-axis starts at a negative number even though there are no points that are negative. I would like to ensure that the Y-axis always starts at zero, but I do not wish to work out what the maximum value should be (after all that's why I use your component rather than drawing it myself).

Please advise.


Ganesan [Syncfusion]
Replied On September 13, 2011 05:02 PM UTC


Hi,



Currently we have no option to define one end of the range alone in the AxisRange. However, you can make use of the VisibleRange property to set the range to be visible in the Axis.

// Setting the visible Range in the Chart.
area.PrimaryAxis.IsAutoSetRange = true;
area.PrimaryAxis.VisibleRange = new DoubleRange(1d, 6);
area.PrimaryAxis.Range = area.PrimaryAxis.VisibleRange;
area.PrimaryAxis.RangePadding = ChartRangePaddingType.None;


We have also attached a sample to demonstrate the same. Kindly download the sample from the following link.

ChartAxisAutoSetSetRange1106974994.zip


Thanks,
Ganesan



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

;