dashboard-devexpress-dot-dashboardcommon-fa9c26ec.md
A Treemap dashboard item that allows you to display large amounts of hierarchically structured (tree-structured) data.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
public class TreemapDashboardItem :
DataDashboardItem,
IElementContainer
Public Class TreemapDashboardItem
Inherits DataDashboardItem
Implements IElementContainer
The Treemap dashboard item can be used to visualize data in nested rectangles that are called tiles.
The following documentation is available.
The following code snippets show how to bind a Treemap dashboard item to data in code.
using DevExpress.DashboardCommon;
using DevExpress.XtraEditors;
namespace DashboardViewer_Treemap {
public partial class Form1 : XtraForm {
public Form1() {
InitializeComponent();
Dashboard dashboard = new Dashboard();
DashboardExtractDataSource dataSource = new DashboardExtractDataSource();
dataSource.FileName = @"..\..\Data\SalesDataExtract.dat";
dashboard.DataSources.Add(dataSource);
TreemapDashboardItem treeMap = new TreemapDashboardItem();
treeMap.DataSource = dataSource;
treeMap.Values.Add(new Measure("Sales"));
treeMap.Arguments.Add(new Dimension {
DataMember = "Product Category",
GroupChildValues = true });
treeMap.Arguments.Add(new Dimension("Product Sub-Category"));
treeMap.LayoutAlgorithm = DashboardTreemapLayoutAlgorithm.Striped;
dashboard.Items.Add(treeMap);
dashboardViewer1.Dashboard = dashboard;
}
}
}
Imports DevExpress.DashboardCommon
Imports DevExpress.XtraEditors
Namespace DashboardViewer_Treemap
Partial Public Class Form1
Inherits XtraForm
Public Sub New()
InitializeComponent()
Dim dashboard As New Dashboard()
Dim dataSource As New DashboardExtractDataSource()
dataSource.FileName = "..\..\Data\SalesDataExtract.dat"
dashboard.DataSources.Add(dataSource)
Dim treeMap As New TreemapDashboardItem()
treeMap.DataSource = dataSource
treeMap.Values.Add(New Measure("Sales"))
treeMap.Arguments.Add(New Dimension With {.DataMember = "Product Category", .GroupChildValues = True})
treeMap.Arguments.Add(New Dimension("Product Sub-Category"))
treeMap.LayoutAlgorithm = DashboardTreemapLayoutAlgorithm.Striped
dashboard.Items.Add(treeMap)
dashboardViewer1.Dashboard = dashboard
End Sub
End Class
End Namespace
Object DashboardItem DataDashboardItem TreemapDashboardItem
See Also