@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.
150 lines (149 loc) • 5.83 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* 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 labels configuration for the category axis of the Chart ([see example]({% slug labels_chart_charts %})).
*/
export class CategoryAxisLabelsComponent extends SettingsComponent {
configurationService;
/**
* Specifies the background color of the labels.
*/
background;
/**
* Specifies the border configuration of the labels.
*/
border;
/**
* Sets the text color of the labels.
*/
color;
/**
* Specifies a function that creates the content of the label.
*/
content;
/**
* Defines the culture info used for formatting the dates.
*/
culture;
/**
* Specifies the format for different date parts.
*/
dateFormats;
/**
* Specifies the font style of the labels.
* @default '12px sans-serif'
*/
font;
/**
* Specifies the format for displaying the labels. Uses the [`format`]({% slug api_intl_intlservice %}#toc-format) method of IntlService.
* Contains one placeholder (`"{0}"`) which represents the category value.
* @default '{0}'
*/
format;
/**
* Specifies the margin of the labels. A numeric value sets all margins.
* @default 0
*/
margin;
/**
* Determines whether the Chart mirrors the axis labels and ticks. If the labels are normally on the
* left side of the axis, the mirroring of the axis renders them to the right.
* @default false
*/
mirror;
/**
* Specifies the padding of the labels. A numeric value sets all paddings.
* @default 0
*/
padding;
/**
* Specifies the position of the axis labels. By default, the labels are positioned next to the axis.
*
* @default 'onAxis'
*/
position;
/**
* Specifies the rotation angle of the labels. By default, the labels are not rotated.
*
* If the axis is horizontal, can be set to `"auto"`. In this case, the labels are rotated
* only if the slot size is not sufficient for the entire labels.
* @default 0
*/
rotation;
/**
* Specifies the number of labels to skip. By default, no labels are skipped.
* @default 0
*/
skip;
/**
* Specifies the rendering step of the label—renders every n<sup>th</sup> label. By default, every label is rendered.
* @default 1
*/
step;
/**
* Determines whether the Chart displays the category axis labels.
* By default, the category axis labels are visible.
* @default true
*/
visible;
/**
* Specifies a function that creates a visual for the label.
*/
visual;
constructor(configurationService) {
super('labels', configurationService);
this.configurationService = configurationService;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CategoryAxisLabelsComponent, deps: [{ token: i1.ConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CategoryAxisLabelsComponent, isStandalone: true, selector: "kendo-chart-category-axis-item-labels", inputs: { background: "background", border: "border", color: "color", content: "content", culture: "culture", dateFormats: "dateFormats", font: "font", format: "format", margin: "margin", mirror: "mirror", padding: "padding", position: "position", rotation: "rotation", skip: "skip", step: "step", visible: "visible", visual: "visual" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CategoryAxisLabelsComponent, decorators: [{
type: Component,
args: [{
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'kendo-chart-category-axis-item-labels',
template: '',
standalone: true
}]
}], ctorParameters: function () { return [{ type: i1.ConfigurationService }]; }, propDecorators: { background: [{
type: Input
}], border: [{
type: Input
}], color: [{
type: Input
}], content: [{
type: Input
}], culture: [{
type: Input
}], dateFormats: [{
type: Input
}], font: [{
type: Input
}], format: [{
type: Input
}], margin: [{
type: Input
}], mirror: [{
type: Input
}], padding: [{
type: Input
}], position: [{
type: Input
}], rotation: [{
type: Input
}], skip: [{
type: Input
}], step: [{
type: Input
}], visible: [{
type: Input
}], visual: [{
type: Input
}] } });