Class TreeMapLegendSettings
Sets and gets the options for customizing the legend of the treemap component.
Inheritance
Namespace: Syncfusion.Blazor.TreeMap
Assembly: Syncfusion.Blazor.dll
Syntax
public class TreeMapLegendSettings : OwningComponentBase
Constructors
TreeMapLegendSettings()
Declaration
public TreeMapLegendSettings()
Properties
Alignment
Sets and gets the alignment of legend in the treemap component.
Declaration
public Alignment Alignment { get; set; }
Property Value
Type | Description |
---|---|
Alignment | An Alignment enum value representing the alignment of the legend. Default is Center. |
Remarks
Use this property to position the legend within the treemap. Options include Center, Near, or Far alignment.
Background
Sets and gets the background color of legend in the treemap component.
Declaration
public string Background { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the color of the legend's background. Default is "transparent". |
Remarks
Set this property to customize the background color of the legend area for visual styling.
ChildContent
Sets and gets the content of the UI element.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | A Microsoft.AspNetCore.Components.RenderFragment representing the child content of the legend. |
Remarks
The child content can include any UI rendering logic that you want to nest inside the legend, allowing for custom content and layout.
Fill
Sets and gets the shape color of legend in the treemap component.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the color of the shapes within the legend. |
Remarks
This property is used to define the fill color for legend shapes, helping to differentiate data values visually.
Height
Sets and gets the height of legend in the treemap component.
Declaration
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the height of the legend. |
Remarks
This property allows you to adjust the height of the legend for better layout integration.
ImageUrl
Sets and gets the URL path of the legend shapes rendered as image in the treemap component.
Declaration
public string ImageUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the URL to the image used for the legend shapes. |
Remarks
Use this property to specify a custom image as the legend shape, providing a visual representation that aligns with your data's context.
InvertedPointer
Enables or disables the pointer for interactive legend in the treemap component.
Declaration
public bool InvertedPointer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A System.Boolean indicating whether the legend pointer is inverted. |
Remarks
This property is used to toggle the state of the legend's interactive pointer, enabling enhanced user interaction within the treemap.
LabelDisplayMode
Sets and gets the label intersect action of legend in the treemap component.
Declaration
public LabelIntersectAction LabelDisplayMode { get; set; }
Property Value
Type | Description |
---|---|
LabelIntersectAction | A LabelIntersectAction enum value representing the mode of handling intersecting labels. Default is None. |
Remarks
Use this property to define how overlapping labels are managed, ensuring legibility and visual clarity.
LabelPosition
Sets and gets the label position for interactive legend in the treemap component.
Declaration
public LabelPlacement LabelPosition { get; set; }
Property Value
Type | Description |
---|---|
LabelPlacement | A LabelPlacement enum value representing the position of labels. Default is After. |
Remarks
Configure this property to specify where labels should be positioned relative to the legend shapes.
Mode
Sets and gets the mode of legend in the treemap component. The modes available are default and interactive modes.
Declaration
public LegendMode Mode { get; set; }
Property Value
Type | Description |
---|---|
LegendMode | A LegendMode enum indicating the legend's mode. Default is Default. |
Remarks
Use this property to choose between default and interactive modes, affecting how users interact with the legend.
Opacity
Sets and gets the opacity of legends in the treemap component.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the opacity level of the legend. Default is 1.0. |
Remarks
Set this property to adjust the transparency of the legend, providing visual hierarchy in the component.
Orientation
Sets and gets the orientation of legend in the treemap component.
Declaration
public LegendOrientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
LegendOrientation | A LegendOrientation enum representing the orientation of the legend. Default is None. |
Remarks
Configure the legend's orientation to align with your UI design, choosing from horizontal, vertical, or none.
Position
Sets and gets the position of legend in the treemap component.
Declaration
public LegendPosition Position { get; set; }
Property Value
Type | Description |
---|---|
LegendPosition | A LegendPosition enum indicating where the legend is placed. Default is Bottom. |
Remarks
This property determines the location of the legend relative to the treemap, enhancing the component's visual structure.
RemoveDuplicateLegend
Enables or disables to remove the duplicate legend item.
Declaration
public bool RemoveDuplicateLegend { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A System.Boolean that specifies whether duplicate legend items are removed. |
Remarks
Use this property to ensure that only unique legend items are displayed, preventing redundant entries.
Shape
Sets and gets the shape of legend in the treemap component.
Declaration
public LegendShape Shape { get; set; }
Property Value
Type | Description |
---|---|
LegendShape | A LegendShape enum representing the shape of items within the legend. Default is Circle. |
Remarks
This property provides a set of shape options like Circle, Rectangle, and other custom shapes to represent data in the legend.
ShapeHeight
Sets and gets the height of the shapes of legend in the treemap component.
Declaration
public double ShapeHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the height of legend shapes. Default is 15.0. |
Remarks
Adjust this property to customize the visual scale of legend shapes for better clarity and design consistency.
ShapePadding
Sets and gets the shape padding of legend in the treemap component.
Declaration
public double ShapePadding { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double indicating the space between shapes within the legend. Default is 10.0. |
Remarks
Use this property to control the spacing around legend shapes for improved layout aesthetics.
ShapeWidth
Sets and gets the width of the shapes in legend in the treemap component.
Declaration
public double ShapeWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A System.Double representing the width of legend shapes. Default is 15.0. |
Remarks
This property allows for customization of shape width in the legend to maintain consistency across various display sizes.
ShowLegendPath
Sets and gets the visibility state of the legend in the treemap component.
Declaration
public string ShowLegendPath { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String specifying the path for setting legend visibility. |
Remarks
Control this property's value to dynamically show or hide the legend based on certain conditions.
ValuePath
Sets and gets the value path from the data source to render legend in the treemap component.
Declaration
public string ValuePath { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String indicating the data source path used for legend value representation. |
Remarks
Utilize this property to bind legend items to specific data points, creating meaningful associations.
Visible
Enables or disables the visibility of legend in the treemap component.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A System.Boolean determining whether the legend is displayed. |
Remarks
This property toggles the legend's presence in the component, allowing focus on other visual elements.
Width
Sets and gets the width of legend in the treemap component.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the width of the legend. |
Remarks
Adjust this property to ensure the legend fits your layout while providing necessary information.
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 |
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. |
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. |