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

How to trigger the auto-ranging of axes

5 Answers 157 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 24 Jul 2012, 06:58 PM
Hello,

I'm using your ChartView in combination with a TreeView and selectable series. I have bound the series visibility to a Checked-Property on my series elements. When I check some series they are drawn in the Chart and the axis scales accordingly. But there is one problem: It does only increase the displayed range and there is no change when I disable the series that caused the range-adaption. So I'm looking for a way to tell the Chart that it must auto-range the whole display area so I have the best view on it. I haven't found such a method and the frameworks UpdateLayout(), Arrange() don't work. Is there any way to accomplish that?

Thanks in advance!

Best regards,
Peter Schmidt

5 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 27 Jul 2012, 11:37 AM
Hello Hans-Peter,

Indeed we must admit your observations are correct -- currently series visibility is not taken into account when the control calculates the automatic axis range and that is why you are experiencing the described result. We have logged the issue in our public issue tracking system here. Currently there are two possible workarounds -- you will need to either remove the series from the RadCartesianChart.Series collection (instead toggling its visibility), or manually set the LinearAxis.Maximum property value when toggling the series visibility (in order to force the axis to recalculate its range).

We have updated your Telerik points for the report as well.


Greetings,
Giuseppe
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Chinmaya
Top achievements
Rank 1
answered on 25 Sep 2014, 12:40 PM
Hello ,

I have the same problem i am using the latest version Q2 2014 UI for Silverlight

any suggestions to fix this problem other than the earlier mentioned solution?

regards,
Chinmaya
0
Pavel R. Pavlov
Telerik team
answered on 26 Sep 2014, 11:16 AM
Hi Chinmaya,

Is there any specific reason which restricts you from using the already provided workarounds?

As for the issue that Manol logged, you can track its progress here.

Regards,
Pavel R. Pavlov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Chinmaya
Top achievements
Rank 1
answered on 26 Sep 2014, 02:15 PM
Hi Pavel R. Pavlov,

The only issue i am facing by removing the series and  adding the series is :

as the Chart uses chart Palette the series colors changes !!! when i remove and add .

is there a way to always start the palette from the beginning?

Regards,
Chinmaya
 
0
Pavel R. Pavlov
Telerik team
answered on 29 Sep 2014, 06:28 AM
Hi Chinmaya,

You can try adding the series in the same order  as the first time. This should paint all series with the same colors as the first time. If this does not help, you can bind the color of each series to a property exposed by your view model. To do so you can create a style targeting the corresponding series. In that style you will be able to use the property that controls the look of the series to bind it to your ViewModel. 

To find out which properties among the series control their appearance, you can take a look at this article.

Please give this approach a try and let me know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ChartView
Asked by
Peter
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Chinmaya
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or