drilldown option for horizontal bar chart

3 posts, 1 answers
  1. Ruth
    Ruth avatar
    7 posts
    Member since:
    Sep 2013

    Posted 20 Sep 2013 Link to this post


    Is it possible to have a drill down option for  horizontal bar chart in WPF ?

    If yes please provide me the sample code.

  2. Answer
    Petar Kirov
    Petar Kirov avatar
    425 posts

    Posted 25 Sep 2013 Link to this post

    Hi Ruth,

    I have attached a sample project that demonstrates how you can achieve this using RadCartesianChart (which is part of RadChartView). The project includes a generic view model class, which can be used as a base for implementing drill down scenarios. The requirements are that your data should be hierarchical and that each class representing items of a given level should implement the ITreeNode interface.
    For example of how to provide data to this view model, you can look at the TestDrillDownChartDataSource.cs file along with the TestDrillDownClassHierarchy.cs file. There you will find a classes that represent:
    • Sales for a particular Continent
    • Sales for particular Company from a particular Continent (each Continent has a list of Companies)
    • Sales for a particular car Model, manufactured by a particular Company
    • And an enumeration representing the different levels of this hierarchy
    To use the GenericDrillDownChartViewModel class, you need to provide the top level ItemsSource, DataPointBindings for each drill level, functions that return the next and the previous member of the DrillLevelEnum (so the view model know which binding to choose) and finally the start drill level.

    I hope this helps!
    Petar Kirov
    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. Ruth
    Ruth avatar
    7 posts
    Member since:
    Sep 2013

    Posted 26 Sep 2013 Link to this post

    Thankyou so much Petar Kirov.
Back to Top