UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

232 lines (229 loc) 9.41 kB
import { EventEmitter, Output, Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { delegateCombine } from "igniteui-angular-core"; import { AxisAngleLabelMode_$type } from "./AxisAngleLabelMode"; import { IgxCategoryAxisBaseComponent } from "./igx-category-axis-base-component"; import { IgxAxisComponent } from "./igx-axis-component"; import { CategoryAngleAxis } from "./CategoryAngleAxis"; import { ensureEnum } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents a IgxDataChartComponent category angle axis. Useful for displaying radial categories. * * `CategoryAngleAxis` represents a IgxDataChartComponent category angle axis. Useful for displaying radial categories * * ```html * <igx-data-chart * [dataSource]="dataSource" > * <igx-category-angle-axis name="angleAxis" label="Department" /> * <igx-numeric-radius-axis name="radiusAxis" /> * </igx-data-chart> * ``` */ export let IgxCategoryAngleAxisComponent = /*@__PURE__*/ (() => { class IgxCategoryAngleAxisComponent extends IgxCategoryAxisBaseComponent { constructor() { super(); this._actualIntervalChange = null; } createImplementation() { return new CategoryAngleAxis(); } /** * @hidden */ get i() { return this._implementation; } /** * Checks if the axis is of angular type */ get isAngular() { return this.i.dc; } /** * Gets or sets interval of labels on the companion axis. */ get companionAxisInterval() { return this.i.ru; } set companionAxisInterval(v) { this.i.ru = +v; } /** * Gets or sets label angle on the companion axis. */ get companionAxisMinorInterval() { return this.i.rv; } set companionAxisMinorInterval(v) { this.i.rv = +v; } /** * Gets or sets angle in degress that the chart's 0th angle should be offset for the companion axis */ get companionAxisStartAngleOffset() { return this.i.rw; } set companionAxisStartAngleOffset(v) { this.i.rw = +v; } /** * Gets or sets the mode axis labels will operate for the companion axis. */ get companionAxisLabelMode() { return this.i.q9; } set companionAxisLabelMode(v) { this.i.q9 = ensureEnum(AxisAngleLabelMode_$type, v); } /** * Indicates the angle in degress that the chart's 0th angle should be offset. * * Indicates the angle in degress that the chart's 0th angle should be offset. * * ```html * <igx-data-chart * [dataSource]="dataSource" > * <igx-category-angle-axis name="angleAxis" startAngleOffset=30/> * <igx-numeric-radius-axis name="radiusAxis" /> * </igx-data-chart> * ``` */ get startAngleOffset() { return this.i.r6; } set startAngleOffset(v) { this.i.r6 = +v; } /** * Indicates the mode axis labels will operate in. */ get labelMode() { return this.i.ra; } set labelMode(v) { this.i.ra = ensureEnum(AxisAngleLabelMode_$type, v); } get areGroupSizesUneven() { return this.i.rk; } /** * Gets or sets the frequency of displayed labels. * The set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. * * Gets or sets the frequency of displayed labels.The set value is a factor that determines which labels will be hidden. * For example, an interval of 2 will display every other label. * * ```html * <igx-data-chart * [dataSource]="dataSource" > * <igx-category-angle-axis name="angleAxis" interval =2 /> * <igx-numeric-radius-axis name="radiusAxis" /> * </igx-data-chart> * ``` */ get interval() { return this.i.r3; } set interval(v) { this.i.r3 = +v; } /** * Gets the effective value for the current Interval. * * Gets the effective value for the current Interval. */ get actualInterval() { return this.i.rs; } set actualInterval(v) { this.i.rs = +v; } /** * Gets or sets the frequency of displayed minor lines. * The set value is a factor that determines how the minor lines will be displayed. * * Gets or sets the frequency of displayed minor lines. The set value is a factor that determines how the minor lines will be displayed. */ get minorInterval() { return this.i.r4; } set minorInterval(v) { this.i.r4 = +v; } /** * Gets the effective value for the current MinorInterval. * * Get the effective value for the current minorInterval. */ get actualMinorInterval() { return this.i.rt; } set actualMinorInterval(v) { this.i.rt = +v; } /** * Gets the scaled angle in radians from the raw axis value. * @param unscaledAngle * The raw axis value. */ getScaledAngle(unscaledAngle) { let iv = this.i.getScaledAngle(unscaledAngle); return (iv); } /** * Gets the raw axis value from the scaled angle in radians. */ getUnscaledAngle(scaledAngle) { let iv = this.i.getUnscaledAngle(scaledAngle); return (iv); } get actualIntervalChange() { if (this._actualIntervalChange == null) { this._actualIntervalChange = new EventEmitter(); this.i.propertyChanged = delegateCombine(this.i.propertyChanged, (o, e) => { let iv = e; let ext = this.actualInterval; if (this.beforeActualIntervalChange) { this.beforeActualIntervalChange(this, ext); } this._actualIntervalChange.emit(ext); }); } return this._actualIntervalChange; } } IgxCategoryAngleAxisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryAngleAxisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxCategoryAngleAxisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxCategoryAngleAxisComponent, selector: "igx-category-angle-axis", inputs: { companionAxisInterval: "companionAxisInterval", companionAxisMinorInterval: "companionAxisMinorInterval", companionAxisStartAngleOffset: "companionAxisStartAngleOffset", companionAxisLabelMode: "companionAxisLabelMode", startAngleOffset: "startAngleOffset", labelMode: "labelMode", interval: "interval", actualInterval: "actualInterval", minorInterval: "minorInterval", actualMinorInterval: "actualMinorInterval" }, outputs: { actualIntervalChange: "actualIntervalChange" }, providers: [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(() => IgxCategoryAngleAxisComponent) }, { provide: IgxAxisComponent, useExisting: forwardRef(() => IgxCategoryAngleAxisComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxCategoryAngleAxisComponent; })(); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxCategoryAngleAxisComponent, decorators: [{ type: Component, args: [{ selector: 'igx-category-angle-axis', template: ``, providers: [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(() => IgxCategoryAngleAxisComponent) }, { provide: IgxAxisComponent, useExisting: forwardRef(() => IgxCategoryAngleAxisComponent) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { companionAxisInterval: [{ type: Input }], companionAxisMinorInterval: [{ type: Input }], companionAxisStartAngleOffset: [{ type: Input }], companionAxisLabelMode: [{ type: Input }], startAngleOffset: [{ type: Input }], labelMode: [{ type: Input }], interval: [{ type: Input }], actualInterval: [{ type: Input }], minorInterval: [{ type: Input }], actualMinorInterval: [{ type: Input }], actualIntervalChange: [{ type: Output }] } });