ClassChartSeriesLabels
Configures the display and styling of data point labels within chart series. Controls label text formatting, positioning, appearance, and visibility to enhance data readability and provide immediate value information directly on the chart visualization. Children: ChartSeriesLabelsBorder, ChartSeriesLabelsMargin, ChartSeriesLabelsPadding, ChartSeriesLabelsFrom, ChartSeriesLabelsTo.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartSeriesLabels : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartSeriesLabels
Implements:
Inherited Members
Constructors
ChartSeriesLabels()
Declaration
public ChartSeriesLabels()
Properties
Align
Specifies the horizontal and vertical alignment of labels relative to data points using ChartSeriesLabelsAlign values. Options control label positioning for optimal readability and visual balance, especially important for overlapping prevention in dense data visualizations.
Declaration
[Parameter]
public ChartSeriesLabelsAlign? Align { get; set; }
Property Value
AriaTemplate
Specifies the name of the JavaScript function that returns custom ARIA content for accessibility support. The function should return descriptive text for each series point to enhance screen reader experience and meet accessibility requirements for data visualization.
Declaration
[Parameter]
public string AriaTemplate { get; set; }
Property Value
Background
Sets the background color for series data point labels using any valid CSS color value. Accepts hex codes (#FFFFFF), RGB values (rgb(255, 255, 255)), named colors (white, lightgray), or HSL values. Use contrasting backgrounds to ensure label text readability against chart backgrounds.
Declaration
[Parameter]
public string Background { get; set; }
Property Value
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Color
Sets the text color for series data point labels using any valid CSS color value. Accepts hex codes (#333333), RGB values (rgb(51, 51, 51)), named colors (black, white), or HSL values. Choose colors that provide sufficient contrast against label backgrounds for optimal readability.
Distance
Controls the distance of labels from data points in pixels, specifically for donut and pie chart series. Use positive values (5-30 pixels) to move labels away from chart elements, or negative values to position labels closer to or inside chart segments.
Declaration
[Parameter]
public double? Distance { get; set; }
Property Value
Font
Defines the font styling for series labels using CSS font notation. Specify font size, family, and style like "12px Arial", "14px 'Segoe UI'", or "bold 16px sans-serif". Proper font selection ensures label readability and consistency with overall chart design.
Format
Specifies the display format for label values using Kendo format placeholders. Use {0} for main values, {1} for secondary values in multi-value series, {0:P} for percentages, {0:C} for currency, or custom patterns like "Value: {0:N2}". Different series types support different placeholder combinations for comprehensive data formatting.
Position
Determines the positioning strategy for labels relative to data points using ChartSeriesLabelsPosition values. Choose from options like above, below, left, right, or center to optimize label placement based on series type and data density for maximum clarity.
Declaration
[Parameter]
public ChartSeriesLabelsPosition? Position { get; set; }
Property Value
Rotation
Sets the rotation angle for series labels in degrees. Use values like 45, 90, -45, or 0 (default) to rotate label text for better space utilization or visual design. Positive values rotate clockwise, negative values rotate counterclockwise. Useful for angled labels in tight spaces or artistic designs.
Declaration
[Parameter]
public string Rotation { get; set; }
Property Value
Template
Defines a custom template for rendering series label content with access to data context properties. Use template syntax to display formatted data like "#= value #" for basic values, "#= kendo.format('{0:P}', percentage) #" for percentages, or complex HTML structures with conditional logic for rich label presentations.
Declaration
[Parameter]
public string Template { get; set; }
Property Value
Visible
Controls the visibility of series data point labels. Set to true to display labels on all data points, false to hide labels completely, or leave null for default behavior. Visible labels provide immediate data values but may clutter dense charts, so consider data density and chart size when enabling.
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