Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1255
Blazor Treemap
posted

We are duplicating our WPF charts in Blazor.  One chart I am having a problem with is making the  Blazor treemap look like our WPF treemap. 

How do I get the Blazor treemap to render three levels deep instead of two. Our data is a three level hierarchical datasource .

  • 34790
    Offline posted

    Hello Richard,

    The API for the Infragistics for WPF charts is a shared API, but unfortunately, the XamTreemap in WPF and the IgbTreemap is completely different. In order to have a three-layer deep IgbTreemap, the best thing I can recommend is to first flatten your data source, as the hierarchy of the IgbTreemap works such that the property values that you provide for the ParentIdMemberPath and the IdMemberPath will create the hierarchy.

    For example, if you have two items in the same data source, and a ParentIdMemberPath of “Parent” and an IdMemberPath of “Name”, then given these two items…

    SampleData item1 = new SampleData() { Name = "Parent", Parent = null, Value = 10 };
    SampleData item2 = new SampleData() { Name = "Child 1", Parent = "Parent", Value = 2 };

    …item2 would be a child item in the IgbTreemap to it’s parent, item1.

    I am attaching a sample project to demonstrate a three-level hierarchy in the IgbTreemap.

    Please let me know if you have any other questions or concerns on this matter.

    BlazorTreemapTest.zip