ClassChartLegendTitle
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
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartLegendTitle : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartLegendTitle
Implements:
Inherited Members
Constructors
ChartLegendTitle()
Declaration
public ChartLegendTitle()
Properties
Align
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.
Declaration
[Parameter]
public ChartLegendTitleAlign? Align { get; set; }
Property Value
Background
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.
Declaration
[Parameter]
public string Background { get; set; }
Property Value
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Color
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.
Font
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.
Position
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.
Declaration
[Parameter]
public ChartLegendTitlePosition? Position { get; set; }
Property Value
Text
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.
Visible
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.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
OnAfterRender(bool)
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
firstRender
Overrides
OnInitialized()
Declaration
protected override void OnInitialized()
Overrides
OnParametersSet()
Declaration
protected override void OnParametersSet()
Overrides
Serialize()
Declaration
public Dictionary<string, object> Serialize()
Returns