New to Telerik UI for BlazorStart a free 30-day trial

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

C#
public ChartLegendItem()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
protected override void OnAfterRender(bool firstRender)
Parameters:firstRenderbool

Overrides: ComponentBase.OnAfterRender(bool)

C#
protected override void OnInitialized()

Overrides: DataVizChildComponent.OnInitialized()

C#
protected override void OnParametersSet()

Overrides: ComponentBase.OnParametersSet()

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>

Properties

C#
[Parameter]
public RenderFragment ChildContent { get; set; }

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.

C#
[Parameter]
public ChartLegendItemType? Type { get; set; }