Additional Y-axis using same graph points but different units of measurement

2 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    1 posts
    Member since:
    Feb 2011

    Posted 01 Feb 2011 Link to this post

    I have one graph with two y axes.  Both Axes will be a weight measurement.  The left side axis will have "kg" and the right side axis will have "lbs".  For example,  I have a data point that is labeled "10 kg".  I need this data point to line up with 10 kg on the left side and 22 lbs on the right hand side.  Although the graph lines aer graphed using the metric units I need the additionalAxis to be in English Units. Is there anyway to do this?

    I have tried customizing the additionalAxis in the views code behind doing...



    if (defaultView.ChartArea.AdditionalYAxes[0].Title == "lbs")


    defaultView.ChartArea.AdditionalYAxes[0].MinValue = radChart.DefaultView.ChartArea.AxisY.MinValue * 2.2;

    defaultView.ChartArea.AdditionalYAxes[0].MaxValue = radChart.DefaultView.ChartArea.AxisY.MaxValue * 2.2;


    BUT what I need to set is defaultView.ChartArea.AdditionalYAxes[0].ACTUALMINVALUE and ACTUALMAXVALUE.  I need to set these b/c the AxisY.ExtendDirection = SMART and the graph only goes up to the ActualMaxValue.  

    Right now I have the "lb" axis going up to the MaxValue*2.2 (the conversion kg to lbs) which is too high.

    Why can't we access the setter for ActualMinValue and ActualMaxValue?

  2. Nikolay
    Nikolay avatar
    397 posts

    Posted 04 Feb 2011 Link to this post

    Hello Jeremy,

    Please, find attached a small sample app, demonstrating how to achieve the desired behavior.

    Hope this helps.

    Kind regards,
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top