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

Configures the title displayed above or below legend items in ChartLegend. Use this component to provide descriptive text that explains what the legend represents, such as "Data Series", "Categories", or "Metrics". Legend titles improve chart accessibility and comprehension by clearly labeling the legend content and establishing visual hierarchy within the chart layout. Children: ChartLegendTitleBorder, ChartLegendTitleMargin, ChartLegendTitlePadding.

Definition

Constructors

C#
public ChartLegendTitle()

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

Controls the horizontal alignment of the legend title using ChartLegendTitleAlign values. Choose Left to align the title to the left edge of the legend, Right to align it to the right edge, or Center to center it within the legend. This affects the overall legend layout and visual balance.

C#
[Parameter]
public ChartLegendTitleAlign? Align { get; set; }

Sets the background color behind the legend title. Accepts any valid CSS color including hex codes (#F8F9FA), RGB values (rgb(248,249,250)), named colors (whitesmoke), or HSL values. Use background colors to improve title readability against complex legend backgrounds or to create visual emphasis for important legend information.

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

Sets the text color of the legend title. Accepts any valid CSS color including hex codes (#212529), RGB values (rgb(33,37,41)), named colors (darkslategray), or HSL values. Choose colors that provide good contrast with the Background and legend theme for optimal readability and professional appearance.

C#
[Parameter]
public string Color { get; set; }

Defines the font styling for the legend title using CSS font notation. Specify properties like size, weight, and family in a single string, for example: "bold 16px Arial", "italic 14px 'Times New Roman'", or "normal 18px sans-serif". Title fonts are typically larger and bolder than legend labels to establish clear visual hierarchy.

C#
[Parameter]
public string Font { get; set; }

Controls the positioning of the legend title relative to legend items using ChartLegendTitlePosition values. Determines whether the title appears above (Top) or below (Bottom) the legend items. This affects the legend's visual hierarchy and reading flow for users.

C#
[Parameter]
public ChartLegendTitlePosition? Position { get; set; }

Specifies the text content displayed as the legend title. Use descriptive text that explains what the legend represents, such as "Data Series", "Categories", "Metrics", or any contextual information that helps users understand the legend content. Clear, informative titles improve chart accessibility and comprehension.

C#
[Parameter]
public string Text { get; set; }

Controls whether the legend title is displayed. Set to true (default) to show the title with its descriptive text, or false to hide it for cleaner legend appearance. Visible titles improve legend comprehension by providing context about what the legend items represent.

C#
[Parameter]
public bool? Visible { get; set; }