officefileapi-devexpress-dot-spreadsheet-dot-charts-dot-serieslayoutoptions-1c19f735.md
Returns options for a treemap data series.
Namespace : DevExpress.Spreadsheet.Charts
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
TreemapSeriesOptions Treemap { get; }
ReadOnly Property Treemap As TreemapSeriesOptions
| Type | Description |
|---|---|
| TreemapSeriesOptions |
An object that stores series options for a treemap chart.
|
You can access this nested property as listed below:
| Object Type | Path to Treemap |
|---|---|
| Series |
.LayoutOptions .Treemap
|
The code sample below creates a treemap chart. Use the TreemapSeriesOptions.ParentLabelLayout property to specify the layout of parent labels in the chart. In this example, they are displayed as banners above the categories.
// Create a treemap chart and specify its location.
Chart chart = worksheet.Charts.Add(ChartType.Treemap, worksheet["B2:E14"]);
chart.TopLeftCell = worksheet.Cells["G2"];
chart.BottomRightCell = worksheet.Cells["N17"];
// Specify series options.
var options = chart.Series[0].LayoutOptions.Treemap;
options.ParentLabelLayout = TreemapParentLabelLayout.Banner;
// Add the chart title.
chart.Title.Visible = true;
chart.Title.SetValue("Daily Food Sales");
' Create a treemap chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.Treemap, worksheet("B2:E14"))
chart.TopLeftCell = worksheet.Cells("G2")
chart.BottomRightCell = worksheet.Cells("N17")
' Specify series options.
Dim options As TreemapSeriesOptions = chart.Series(0).LayoutOptions.Treemap
options.ParentLabelLayout = TreemapParentLabelLayout.Banner
' Add the chart title.
chart.Title.Visible = True
chart.Title.SetValue("Daily Food Sales")
See Also