Class
ChartLegendItem

Configures the visual appearance and behavior of individual legend items in ChartLegend. Use this component to customize how series are represented in the legend, including marker styles, line appearance, area styling, and hover effects. Legend items help users identify and interact with different data series through visual indicators, colors, and symbols that match the corresponding chart elements. Children: ChartLegendItemArea, ChartLegendItemHighlight, ChartLegendItemLine, ChartLegendItemMarkers.

Definition

Constructors

ChartLegendItem()

Declaration

cs-api-definition
public ChartLegendItem()

Properties

ChildContent

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Type

Defines the visual representation type for legend items using ChartLegendItemType values. Choose from different marker styles to match your chart type: Rectangle for bar/column charts, Circle for scatter/bubble charts, Line for line charts, or Auto to automatically match the series type. This determines how the legend visually represents each data series.

Declaration

cs-api-definition
[Parameter]
public ChartLegendItemType? Type { get; set; }

Property Value

ChartLegendItemType?

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRender(bool)

Declaration

cs-api-definition
protected override void OnAfterRender(bool firstRender)

Parameters

firstRender

bool

Overrides ComponentBase.OnAfterRender(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides DataVizChildComponent.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Serialize()

Declaration

cs-api-definition
public Dictionary<string, object> Serialize()

Returns

Dictionary<string, object>