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

Add Custom Range For AxisY

3 Answers 85 Views
Chart
This is a migrated thread and some comments may be shown as answers.
A Mahdavi
Top achievements
Rank 1
A Mahdavi asked on 27 Oct 2010, 02:47 PM
Hi,

I use this code for setting a custom range for AxisY in my chart, but only last range apply in chart and other range clear by it.

radchart.DefaultView.ChartArea.AxisY.AutoRange = false;
radchart.DefaultView.ChartArea.AxisY.AddRange(0, 100000000, 100000000 / 4);
radchart.DefaultView.ChartArea.AxisY.AddRange(100000000, 1000000000, (1000000000 - 100000000)/4);
radchart.DefaultView.ChartArea.AxisY.AddRange(1000000000, max2, (max2 - 1000000000) / 2);

3 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 01 Nov 2010, 10:08 AM
Hi,

As I understand from your code snippet you want to set  several separate ranges for Y axis. Unfortunately this is not possible with RadChart for WPF.
Setting custom Range for AxisY with AddRange() method is same as initializing AxisY's MinValue, MaxValue and Step properties one by one. Note that these properties are of type double. This means that they are value types. When the runtime deals with a value type, it's dealing directly with its underlying data. No matter how many times you set these properties, it will apply their last values as final.

Kind regards,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
A Mahdavi
Top achievements
Rank 1
answered on 01 Nov 2010, 10:23 AM
Hi,
Thanks a lot for your answer,

I have a rang of big numbers and I must split my Y axis to some range. for example, my data is :

range 0-1,000,000
range 100,000,000-1,000,000,000

Hence, I must declare some custom range in my Y axis.

0
Evgenia
Telerik team
answered on 04 Nov 2010, 10:28 AM
Hello,

As I mentioned in my previous post you can't split your YAxis to some range. As a workaround you can use multiple Y Axes as described in our help topic - http://www.telerik.com/help/wpf/radchart-features-axes-multiple-y-axes.html. First YAxis will have range from 0-1,000,000 and second - 100,000,000-1,000,000,000.

All the best,
Evgenia
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart
Asked by
A Mahdavi
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
A Mahdavi
Top achievements
Rank 1
Share this question
or