UNPKG

igniteui-angular-charts

Version:

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

231 lines (228 loc) 9.6 kB
import { __extends } from "tslib"; 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> * ``` */ var IgxCategoryAngleAxisComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxCategoryAngleAxisComponent, _super); function IgxCategoryAngleAxisComponent() { var _this = _super.call(this) || this; _this._actualIntervalChange = null; return _this; } IgxCategoryAngleAxisComponent.prototype.createImplementation = function () { return new CategoryAngleAxis(); }; Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "isAngular", { /** * Checks if the axis is of angular type */ get: function () { return this.i.b9; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "startAngleOffset", { /** * 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: function () { return this.i.ne; }, set: function (v) { this.i.ne = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "labelMode", { /** * Indicates the mode axis labels will operate in. */ get: function () { return this.i.ml; }, set: function (v) { this.i.ml = ensureEnum(AxisAngleLabelMode_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "areGroupSizesUneven", { get: function () { return this.i.mv; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "interval", { /** * 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: function () { return this.i.nb; }, set: function (v) { this.i.nb = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "actualInterval", { /** * Gets the effective value for the current Interval. * * Gets the effective value for the current Interval. */ get: function () { return this.i.m3; }, set: function (v) { this.i.m3 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "minorInterval", { /** * 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: function () { return this.i.nc; }, set: function (v) { this.i.nc = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "actualMinorInterval", { /** * Gets the effective value for the current MinorInterval. * * Get the effective value for the current minorInterval. */ get: function () { return this.i.m4; }, set: function (v) { this.i.m4 = +v; }, enumerable: false, configurable: true }); /** * Gets the scaled angle in radians from the raw axis value. * @param unscaledAngle * The raw axis value. */ IgxCategoryAngleAxisComponent.prototype.getScaledAngle = function (unscaledAngle) { var iv = this.i.getScaledAngle(unscaledAngle); return (iv); }; /** * Gets the raw axis value from the scaled angle in radians. */ IgxCategoryAngleAxisComponent.prototype.getUnscaledAngle = function (scaledAngle) { var iv = this.i.getUnscaledAngle(scaledAngle); return (iv); }; Object.defineProperty(IgxCategoryAngleAxisComponent.prototype, "actualIntervalChange", { get: function () { var _this = this; if (this._actualIntervalChange == null) { this._actualIntervalChange = new EventEmitter(); this.i.propertyChanged = delegateCombine(this.i.propertyChanged, function (o, e) { var iv = e; var ext = _this.actualInterval; if (_this.beforeActualIntervalChange) { _this.beforeActualIntervalChange(_this, ext); } _this._actualIntervalChange.emit(ext); }); } return this._actualIntervalChange; }, enumerable: false, configurable: true }); 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: { startAngleOffset: "startAngleOffset", labelMode: "labelMode", interval: "interval", actualInterval: "actualInterval", minorInterval: "minorInterval", actualMinorInterval: "actualMinorInterval" }, outputs: { actualIntervalChange: "actualIntervalChange" }, providers: [{ provide: IgxCategoryAxisBaseComponent, useExisting: forwardRef(function () { return IgxCategoryAngleAxisComponent; }) }, { provide: IgxAxisComponent, useExisting: forwardRef(function () { return IgxCategoryAngleAxisComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxCategoryAngleAxisComponent; }(IgxCategoryAxisBaseComponent)); export { 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(function () { return IgxCategoryAngleAxisComponent; }) }, { provide: IgxAxisComponent, useExisting: forwardRef(function () { return IgxCategoryAngleAxisComponent; }) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { startAngleOffset: [{ type: Input }], labelMode: [{ type: Input }], interval: [{ type: Input }], actualInterval: [{ type: Input }], minorInterval: [{ type: Input }], actualMinorInterval: [{ type: Input }], actualIntervalChange: [{ type: Output }] } });