How to trigger the auto-ranging of axes

6 posts, 0 answers
  1. Peter
    Peter avatar
    28 posts
    Member since:
    Oct 2006

    Posted 24 Jul 2012 Link to this post

    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
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 27 Jul 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Chinmaya
    Chinmaya avatar
    24 posts
    Member since:
    Aug 2014

    Posted 25 Sep 2014 in reply to Giuseppe Link to this post

    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
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 26 Sep 2014 Link to this post

    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.
     
  6. Chinmaya
    Chinmaya avatar
    24 posts
    Member since:
    Aug 2014

    Posted 26 Sep 2014 in reply to Pavel R. Pavlov Link to this post

    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
     
  7. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 29 Sep 2014 Link to this post

    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.
     
Back to Top
UI for WPF is Visual Studio 2017 Ready