Hierarchical Chart with different chart at last leaf

4 posts, 0 answers
  1. Eric
    Eric avatar
    14 posts
    Member since:
    Jun 2012

    Posted 08 Nov 2011 Link to this post

    I have a hierarchical chart bound to a tree of CAD assemblies. The hierarchical bar chart is working great for as many levels of assembly as I want. The problem is, when you dig down to the last leaf in any branch of the tree, the last leaf has no children, so the chart says "no data". What I'd like to do instead is show a different chart bound to the leaf instead.

    Is it clear what I want to do?

    does anyone have some tips on how to do this?

    Eric
  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 11 Nov 2011 Link to this post

    Hi Eric,

    I am not sure I really understand your requirement. Can you please describe a sample scenario in details so I can have a clear view on the problem. Thanks.

    Best regards,
    Ves
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Eric
    Eric avatar
    14 posts
    Member since:
    Jun 2012

    Posted 11 Nov 2011 Link to this post

    What I really want to do is have two charts displayed at once. Once chart is a hierarchical drill-down chart. The Root node is an assembly of mechanical parts and the bars represent the weight of each child part of the root node. (I already have this working).

    I want a line chart that is bound to the same node, but displays the assembly's weight history. (A different collection in the object). 

    If you drill down in the bar chart, I want the line chart to stay bound to the current node in the bar chart.

    That's probably still not clear, it's hard to describe some things in words. I've created a storyboard in powerpoint and attached each slide as a jpg. Hopefully that helps clarify what I want to do.
  5. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 16 Nov 2011 Link to this post

    Hi Eric,

    Please, find attached a small example, showing this. It actually uses the ItemClick event of the ChartArea to update the DataContext, thus achieving unlimited levels in the self-referencing hierarchy. Now, all you need is to create a second chart and bind it to DataContext's details.

    Best regards,
    Ves
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top