Class
ChartSeriesLabels

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

Constructors

ChartSeriesLabels()

Declaration

cs-api-definition
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

cs-api-definition
[Parameter]
public ChartSeriesLabelsAlign? Align { get; set; }

Property Value

ChartSeriesLabelsAlign?

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

cs-api-definition
[Parameter]
public string AriaTemplate { get; set; }

Property Value

string

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

cs-api-definition
[Parameter]
public string Background { get; set; }

Property Value

string

ChildContent

Declaration

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

Property Value

RenderFragment

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.

Declaration

cs-api-definition
[Parameter]
public string Color { get; set; }

Property Value

string

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

cs-api-definition
[Parameter]
public double? Distance { get; set; }

Property Value

double?

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.

Declaration

cs-api-definition
[Parameter]
public string Font { get; set; }

Property Value

string

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.

Declaration

cs-api-definition
[Parameter]
public string Format { get; set; }

Property Value

string

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

cs-api-definition
[Parameter]
public ChartSeriesLabelsPosition? Position { get; set; }

Property Value

ChartSeriesLabelsPosition?

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

cs-api-definition
[Parameter]
public string Rotation { get; set; }

Property Value

string

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

cs-api-definition
[Parameter]
public string Template { get; set; }

Property Value

string

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.

Declaration

cs-api-definition
[Parameter]
public bool? Visible { get; set; }

Property Value

bool?

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>