@progress/kendo-angular-charts
Version:
Kendo UI Charts for Angular - A comprehensive package for creating beautiful and interactive data visualization. Every chart type, stock charts, and sparklines are included.
94 lines (93 loc) • 4.26 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { drawing } from '@progress/kendo-drawing';
import { SeriesLabelsAlignment, SeriesLabelsContentArgs } from '../../common/property-types';
import { Border, Margin, Padding, SeriesLabelsVisualArgs } from '../../common/property-types';
import { SeriesLabelsPosition } from '../../common/property-types';
import { SeriesLabelsFrom } from './labels.from.interface';
import { SeriesLabelsTo } from './labels.to.interface';
/**
* Represents the configuration options of the series labels.
*/
export interface SeriesLabels {
/**
* Specifies the alignment of the label when [`series.type`](https://www.telerik.com/kendo-angular-ui/components/charts/api/series#type) is set to `"donut"`, `"funnel"`, `"pyramid"` or `"pie"`.
*/
align?: SeriesLabelsAlignment;
/**
* Specifies the background color of the labels. Accepts a valid CSS color string, including HEX and RGB.
*/
background?: string;
/**
* Specifies the border of the labels.
*/
border?: Border;
/**
* Specifies the text color of the labels. Accepts a valid CSS color string, including HEX and RGB.
*/
color?: string;
/**
* Specifies a function which returns the Chart series label content.
* You can split the text into multiple lines by using line feed characters (`"\n"`).
*/
content?: (e: SeriesLabelsContentArgs) => string;
/**
* Specifies a function which returns the content for the ARIA label for the series labels.
*
* @remarks
* This option is related to accessibility.
*/
ariaContent?: (e: SeriesLabelsContentArgs) => string;
/**
* Specifies the distance between the labels when [`series.type`](https://www.telerik.com/kendo-angular-ui/components/charts/api/series#type) is set to `"donut"` or `"pie"`.
*/
distance?: number;
/**
* Specifies the font style of the labels.
*/
font?: string;
/**
* Specifies the format of the labels. Uses the [`format`](https://www.telerik.com/kendo-angular-ui/components/globalization/internationalization/api/intlservice#format) method of the IntlService.
*/
format?: string;
/**
* Specifies the margin of the labels. A numeric value sets all margins.
*/
margin?: Margin | number;
/**
* Specifies the padding of the labels. A numeric value sets all paddings.
* Bar and Column series always apply full padding and ignore this setting.
*/
padding?: Padding | number;
/**
* Specifies the position of the labels.
*/
position?: SeriesLabelsPosition;
/**
* Specifies the rotation angle of the labels. By default, the labels are not rotated.
*/
rotation?: number;
/**
* If set to `true`, the Chart displays the series labels.
* By default, the Chart series labels are not displayed.
*/
visible?: boolean;
/**
* Specifies a function that can be used to create a custom visual for the labels.
*/
visual?: (e: SeriesLabelsVisualArgs) => drawing.Element;
/**
* Specifies the `from` label configuration of the Chart series.
* Displays the series from labels when either the [`series.labels.visible`](https://www.telerik.com/kendo-angular-ui/components/charts/api/serieslabels#visible) or
* the [`series.labels.from.visible`](https://www.telerik.com/kendo-angular-ui/components/charts/api/serieslabelsfrom#visible) option is set to `true`.
*/
from?: SeriesLabelsFrom;
/**
* Specifies the `to` label configuration of the Chart series.
* Displays the series to labels when either the [`series.labels.visible`](https://www.telerik.com/kendo-angular-ui/components/charts/api/serieslabels#visible) or
* the [`series.labels.to.visible`](https://www.telerik.com/kendo-angular-ui/components/charts/api/serieslabelsto#visible) option is set to `true`.
*/
to?: SeriesLabelsTo;
}