Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Y Axis Interval
posted

Hi,

I'm working on a bar chart and what I want is the intervals that are calculated once the graph is created.

So for instance, I know the interval is 1,000 in the chart below.

I looked into the NumericYAxis and tried Interval, TickMarkValues and ActualTickMarkValues, but they are zero.

Parents
  • 30945
    Offline posted

    Hello Wai,

     

    Thank you for your post. I have been looking into your question and the NumericYAxis has a ActualTickmarkValues property that you can use to get the interval. You can get the values of the axis, by calling the MajorValues and you can calculate the interval based on two sequential values:

     

                NumericYAxis y = xmDataChart.Axes[1] as NumericYAxis;

     

                var vals = y.ActualTickmarkValues.MajorValues();

                if (vals.Count() > 1)

                {

                    double interval = vals.ElementAt(1) - vals.ElementAt(0);

                }

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir, MCPD

    Developer Support Supervisor - XAML

    Infragistics

    www.infragistics.com/support

Reply Children