I went through the Data Drilldown sample. Using the 3 level hierarchy (Manufacturer, product and invenstory), one can select the depth to show.
Lets pretent that there are 10 levels, does the treemap automatically support say showing 3 levels at a time starting from a given level. Lets say, we start at level 5, we only show entries at level 5, 6 and 7. We can move a slider to 7 and the control will display levels 7, 8 and 9 (of the 10 level hierarchy).
Given that we have a deeply nested hierarchy, my guess is that we would have to code it using data filters, filtering out all the data that is not of interest (e.g., filter out less than 7 and greater than 9 when at level 7) and rebinding this to the control. Hope this query makes sense.Note that the filter example shows a heat map. I'm assuming this is possible for treemap. Please validate.
ThanksRick
Thanks for your reply.It was clear how to show all the children of a given root node.I just wanted to know if there was a way to say, show only 2 levels from a given root.My guess based on the api's is that the answer is NO.There is a show levels, but the treemap nodes are still present, just not painted.In order to support this facility, I think I have to use a filter. I just wanted to confirm that this is the best way to go. I mean, I can
1) use the native filtering that is supported by the treeMap or2) re-filter (to only include n levels from the selected root) the dataset and re-bind it to the tree map with each drill down.I think that 1 will work. I will work, but just wanted to validate that would work.
If you need to show levels starting from an element that is not at the top hierarchy level you have to specify ItemsSourceRoot property of the treemap. It should be set to the data item which you want to be the root of the shown data. If you want to show all the elements down form let's say level 7 you may set the ItemsSource to an enumerable that contains all the elements at level 7.