This is a migrated thread and some comments may be shown as answers.

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

1 Answer 109 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 01 Feb 2011, 10:45 PM
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?

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 04 Feb 2011, 10:15 AM
Hello Jeremy,

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

Hope this helps.

Kind regards,
Nikolay
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Chart
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or