Show / Hide series

2 posts, 0 answers
  1. Carlo
    Carlo avatar
    5 posts
    Member since:
    Aug 2013

    Posted 10 Sep 2013 Link to this post

    Hello, I'm trying to do a project where I have a few checkboxes that correspond to different series. When the checkbox is checked, the series is displayed, and if the checbox is unchecked, the series is collpased. There are two problems with this:

    1) The legend still shows the collapsed series
    2) The values on the Y axis are not recalculated as the series go away. For example: If series "A" has max value is 5000, and series "B" max value is 250, when hiding "A" the Y values keep showing all the way up to 5000.

    How can I fix these two problems?

    Thank you,

    - Carlo
  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 14 Sep 2013 Link to this post

    Hi Carlo,

    I have prepared a sample project that demonstrates a pattern for achieving this. The idea is that you have a collection that holds the information for all of your series (the SeriesInfos property) and property that returns only the visible series (the FilteredSeries property).

    For this project I have used the ChartSeriesProvider feature. You can learn more about it here.

    I hope this helps.
     
    Regards,
    Petar Kirov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top