UNPKG

@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.

158 lines (157 loc) 5.69 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { ConfigurationService } from '../../common/configuration.service'; import { SettingsComponent } from '../../common/settings.component'; import * as i0 from "@angular/core"; import * as i1 from "../../common/configuration.service"; /** * Represents the configuration of the Chart series labels * ([see example]({% slug labels_chart_charts %})). * * @example * ```html * <kendo-chart> * <kendo-chart-series> * <kendo-chart-series-item [data]="[1, 2, 3] type="line"> * <kendo-chart-series-item-labels format="c"> * </kendo-chart-series-item-labels> * </kendo-chart-series-item> * </kendo-chart-series> * </kendo-chart> * ``` * * @remarks * Supported children components are: {@link SeriesLabelsFromComponent} and {@link SeriesLabelsToComponent}. */ export class SeriesLabelsComponent extends SettingsComponent { configurationService; /** * Specifies the alignment of the labels. */ align; /** * Specifies the background color of the labels. */ background; /** * Specifies the border configuration of the labels. */ border; /** * Specifies the text color of the labels. */ color; /** * Specifies a function that returns the content of the labels. */ content; /** * Specifies a function that returns the ARIA content of the labels. */ ariaContent; /** * Specifies the distance between the labels when [`series.type`]({% slug api_charts_series %}#toc-type) is set to `"donut"` or `"pie"`. * @default 35 */ distance; /** * Specifies the font style of the labels. * @default '12px sans-serif' */ font; /** * Specifies the format of the labels. Uses the [`format`]({% slug api_intl_intlservice %}#toc-format) method of the `IntlService`. * @default '{0}' */ format; /** * Specifies the margin of the labels. A numeric value sets all margins. * @default 5 */ margin; /** * Specifies the padding of the labels. A numeric value sets all paddings. * Bar and Column series always apply full padding and ignore this setting. * @default 0 */ padding; /** * Specifies the position of the labels. */ position; /** * Specifies the rotation angle of the labels. */ rotation; /** * Determines whether the Chart displays the series labels. * @default false */ visible; /** * Specifies a function that creates a custom visual for the labels. */ visual; // These options are also available as child components /** * Specifies the `from` labels configuration. */ from; /** * Specifies the `to` labels configuration. */ to; constructor(configurationService) { super('labels', configurationService); this.configurationService = configurationService; this.markAsVisible(); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SeriesLabelsComponent, deps: [{ token: i1.ConfigurationService }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SeriesLabelsComponent, isStandalone: true, selector: "kendo-chart-series-item-labels", inputs: { align: "align", background: "background", border: "border", color: "color", content: "content", ariaContent: "ariaContent", distance: "distance", font: "font", format: "format", margin: "margin", padding: "padding", position: "position", rotation: "rotation", visible: "visible", visual: "visual", from: "from", to: "to" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SeriesLabelsComponent, decorators: [{ type: Component, args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'kendo-chart-series-item-labels', template: '', standalone: true }] }], ctorParameters: () => [{ type: i1.ConfigurationService }], propDecorators: { align: [{ type: Input }], background: [{ type: Input }], border: [{ type: Input }], color: [{ type: Input }], content: [{ type: Input }], ariaContent: [{ type: Input }], distance: [{ type: Input }], font: [{ type: Input }], format: [{ type: Input }], margin: [{ type: Input }], padding: [{ type: Input }], position: [{ type: Input }], rotation: [{ type: Input }], visible: [{ type: Input }], visual: [{ type: Input }], from: [{ type: Input }], to: [{ type: Input }] } });