Class SfTreeMap<TValue>
The treemap control is used to visualize both hierarchical and flat data in the form of nodes along with built-in features like color mapping, legends, label templates, and more.
Implements
Inherited Members
Namespace: Syncfusion.Blazor.TreeMap
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfTreeMap<TValue> : SfDataBoundComponent, ITreeMap
Type Parameters
Name | Description |
---|---|
TValue | Represents the generic data type of the treemap control. |
Constructors
SfTreeMap()
Declaration
public SfTreeMap()
Properties
AllowImageExport
Enables and disables the export to image functionality in treemap.
Declaration
public bool AllowImageExport { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AllowPdfExport
Enables and disables the export to PDF functionality in treemap.
Declaration
public bool AllowPdfExport { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AllowPrint
Enables and disables the print functionality in treemap.
Declaration
public bool AllowPrint { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Background
Sets and gets the background color of the treemap.
Declaration
public string Background { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
BreadcrumbConnector
Specifies the connection between the two words.
Declaration
public string BreadcrumbConnector { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is |
ChildContent
Sets and gets the content of the UI element.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | Accepts a RenderFragment that defines the content of the UI element. |
ColorValuePath
Sets and gets the value path from the data source, based on it color is filled in treemap.
Declaration
public string ColorValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
DataSource
Sets and gets the data source for the treemap component.
Declaration
public IEnumerable<TValue> DataSource { get; set; }
Property Value
Type |
---|
System.Collections.Generic.IEnumerable<TValue> |
Description
Sets and gets the description for treemap.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
DrillDownView
Enables or disables the initial drill in the treemap.
Declaration
public bool DrillDownView { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableBreadcrumb
Enables or disables the connection text in the header of the treemap.
Declaration
public bool EnableBreadcrumb { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableDrillDown
Enables or disables the drill down functionality in treemap.
Declaration
public bool EnableDrillDown { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableGroupingSeparator
Enables or disables the visibility state of the separator for grouping.
Declaration
public bool EnableGroupingSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EqualColorValuePath
Sets and gets the value path from the data source, based on it color is filled in treemap.
Declaration
public string EqualColorValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Format
Sets and gets format for the texts in the treemap.
Declaration
public string Format { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. The default value is empty. |
Height
Sets and gets the height of the treemap component.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
ID
Set the id string for the linear gauge component.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
LayoutType
Specifies the rendering type of layout of the treemap component.
Declaration
public LayoutMode LayoutType { get; set; }
Property Value
Type | Description |
---|---|
LayoutMode | One of the LayoutMode enumeration values. The default value is Squarified. |
Palette
Sets and gets the set of colors to apply in the treemap items.
Declaration
public string[] Palette { get; set; }
Property Value
Type | Description |
---|---|
System.String[] | Accepts the array of string value. |
Query
Sets and gets the query to select particular data from the shape data. This property is applicable only when the data source is created by data manager.
Declaration
public Query Query { get; set; }
Property Value
Type | Description |
---|---|
Query | An object of type Query that represents the query to be executed on the data source. |
RangeColorValuePath
Sets and gets the value path from the data source, based on it color is filled in treemap.
Declaration
public string RangeColorValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
RenderDirection
Specifies the rendering direction of layout of the treemap items.
Declaration
public RenderingMode RenderDirection { get; set; }
Property Value
Type | Description |
---|---|
RenderingMode | One of the RenderingMode enumeration values. The default value is TopLeftBottomRight. |
TabIndex
Sets and gets the tab index value for treemap.
Declaration
public int TabIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Accepts an integer value. The default value is |
Theme
Sets and gets the options for customizing the theme of the treemap component.
Declaration
public Theme Theme { get; set; }
Property Value
Type | Description |
---|---|
Theme | Accepts a value from the Theme enum. The default value is Material. |
WeightValuePath
Sets and gets the value path of the weight from the data source, based on which the map item is rendered.
Declaration
public string WeightValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Width
Sets and gets the width of the treemap component.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
ExportAsync(ExportType, String, Nullable<PdfPageOrientation>, Boolean)
The method is used to perform the export functionality for the rendered treemap.
Declaration
public Task<string> ExportAsync(ExportType type, string fileName, Nullable<PdfPageOrientation> orientation = null, bool allowDownload = true)
Parameters
Type | Name | Description |
---|---|---|
ExportType | type | Specifies the export type for the rendered treemap. |
System.String | fileName | Specifies the filename. |
System.Nullable<Syncfusion.PdfExport.PdfPageOrientation> | orientation | Specifies the portrait or landscape orientation of the page. |
System.Boolean | allowDownload | Specifies whether to download or not. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Returns base64 string. |
OnAfterRenderAsync(Boolean)
Method invoked after each time the component has been rendered.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender | Specifies the first render of the component. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
Overrides
OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
INotifyCollectionChanged event handler to track the changes in the TreeMap data source.
Declaration
protected override void OnObservableChange(string propertyName, object sender, bool isCollectionChanged = false, NotifyCollectionChangedEventArgs e = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | Observable property name. |
System.Object | sender | Observable model object. |
System.Boolean | isCollectionChanged | Sets true if the observable collection changed. |
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | Changed Event Args |
Overrides
OnParametersSetAsync()
Method invoked when the component has received parameters from its parent in the render tree and the incoming values have been assigned to properties.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
Overrides
PrintAsync()
The method is used to perform the print functionality in treemap.
Declaration
public Task PrintAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
RefreshAsync()
The method is used to render the treemap again.
Declaration
public Task RefreshAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |
SelectItemAsync(String[], Boolean)
The method is used to select or remove the selection of treemap item based on the provided selection settings.
Declaration
public Task SelectItemAsync(string[] levelOrder, bool isSelected = true)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | levelOrder | Specifies the level order name for the treemap item. |
System.Boolean | isSelected | Specifies whether the treemap item is selected or not. Default value is true. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the asynchronous operation. |