UNPKG

igniteui-webcomponents-charts

Version:

Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.

305 lines (299 loc) 12.4 kB
import { __extends } from "tslib"; import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { CategoryCollisionMode_$type } from "./CategoryCollisionMode"; import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode"; import { IgcAssigningCategoryStyleEventArgs } from "./igc-assigning-category-style-event-args"; import { IgcAssigningCategoryMarkerStyleEventArgs } from "./igc-assigning-category-marker-style-event-args"; import { IgcMarkerSeriesComponent } from "./igc-marker-series-component"; import { getAllPropertyNames, toSpinal, ensureBool, ensureEnum, enumToString, toPoint } from "igniteui-webcomponents-core"; /** * Represents the base class for IgxDataChartComponent category series. * * `CategorySeries` class represents the base class for IgxDataChartComponent category series. */ var IgcCategorySeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcCategorySeriesComponent, _super); function IgcCategorySeriesComponent() { var _this = _super.call(this) || this; _this._assigningCategoryStyle = null; _this._assigningCategoryStyle_wrapped = null; _this._assigningCategoryMarkerStyle = null; _this._assigningCategoryMarkerStyle_wrapped = null; return _this; } Object.defineProperty(IgcCategorySeriesComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcCategorySeriesComponent.prototype.connectedCallback = function () { if (_super.prototype["connectedCallback"]) { _super.prototype["connectedCallback"].call(this); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } }; IgcCategorySeriesComponent.prototype.disconnectedCallback = function () { if (_super.prototype["disconnectedCallback"]) { _super.prototype["disconnectedCallback"].call(this); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } }; Object.defineProperty(IgcCategorySeriesComponent, "observedAttributes", { get: function () { if (IgcCategorySeriesComponent._observedAttributesIgcCategorySeriesComponent == null) { var names = getAllPropertyNames(IgcCategorySeriesComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcCategorySeriesComponent._observedAttributesIgcCategorySeriesComponent = names; } return IgcCategorySeriesComponent._observedAttributesIgcCategorySeriesComponent; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "hasValueAxis", { get: function () { return this.i.em; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "isValueAxisInverted", { get: function () { return this.i.f6; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "isCategory", { /** * Gets whether or not this series is Category series */ get: function () { return this.i.e0; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "isCustomCategoryStyleAllowed", { /** * Gets or sets whether this category series should allow custom style overrides of its individual visuals. */ get: function () { return this.i.zp; }, set: function (v) { this.i.zp = ensureBool(v); this._a("isCustomCategoryStyleAllowed", this.i.zp); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "isCustomCategoryMarkerStyleAllowed", { /** * Gets or sets whether this category series should allow custom style overrides of its individual marker visuals. */ get: function () { return this.i.zo; }, set: function (v) { this.i.zo = ensureBool(v); this._a("isCustomCategoryMarkerStyleAllowed", this.i.zo); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "categoryCollisionMode", { /** * Gets or sets the category collision mode selection behavior to use for the series. */ get: function () { return this.i.yy; }, set: function (v) { this.i.yy = ensureEnum(CategoryCollisionMode_$type, v); this._a("categoryCollisionMode", enumToString(CategoryCollisionMode_$type, this.i.yy)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "useHighMarkerFidelity", { /** * Sets or Gets whether to increase marker fidelity for extreme data shapes that have lots of Y variation over short X intervals. * * Set `UseHighMarkerFidelity` when your data has high variation along the y-axis within a short span of this x-axis. * * ```ts * this.columnSeries2.useHighMarkerFidelity= "true"; * ``` */ get: function () { return this.i.zv; }, set: function (v) { this.i.zv = ensureBool(v); this._a("useHighMarkerFidelity", this.i.zv); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "transitionInMode", { /** * Gets or sets the method by which to animate the data into the chart when the chart data source is swapped. * Note: Transitions are not currently supported for stacked series. * * `TransitionInMode` controls the direction of the transition-in animation. * * ```ts * * this.columnSeries2.transitionInMode= "accordionfromRight"; * ``` */ get: function () { return this.i.za; }, set: function (v) { this.i.za = ensureEnum(CategoryTransitionInMode_$type, v); this._a("transitionInMode", enumToString(CategoryTransitionInMode_$type, this.i.za)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "isTransitionInEnabled", { /** * Gets or sets whether the series should transition into the plot area when a new data source is assigned. * Note: Transitions are not currently supported for stacked series. * * Set `IsTransitionInEnabled` to true if you want your chart series to animate into position when the chart is loading into view. */ get: function () { return this.i.zq; }, set: function (v) { this.i.zq = ensureBool(v); this._a("isTransitionInEnabled", this.i.zq); }, enumerable: false, configurable: true }); /** * Returns the offset value for this series if grouped on a category axis. */ IgcCategorySeriesComponent.prototype.getOffsetValue = function () { var iv = this.i.getOffsetValue(); return (iv); }; /** * Returns the width of the category grouping this series is in. */ IgcCategorySeriesComponent.prototype.getCategoryWidth = function () { var iv = this.i.getCategoryWidth(); return (iv); }; /** * Gets the item that is the best match for the specified world coordinates. * @param world * The world coordinates to use. */ IgcCategorySeriesComponent.prototype.getItem = function (world) { var iv = this.i.ko(toPoint(world)); return (iv); }; /** * Gets the index of the item based on world coordinates. * @param world * The world coordinates to use. */ IgcCategorySeriesComponent.prototype.getItemIndex = function (world) { var iv = this.i.j4(toPoint(world)); return (iv); }; /** * Gets the precise item index, if possible, based on the closeness to the previous or next whole integer. If the series cannot provide this information, GetExactItemIndex will return the same integer value as GetItemIndex. * @param world * The world position for which to return the index. */ IgcCategorySeriesComponent.prototype.getExactItemIndex = function (world) { var iv = this.i.is(toPoint(world)); return (iv); }; Object.defineProperty(IgcCategorySeriesComponent.prototype, "assigningCategoryStyle", { /** * Event raised when Assigning Category Style */ get: function () { return this._assigningCategoryStyle; }, set: function (ev) { var _this = this; if (this._assigningCategoryStyle_wrapped !== null) { this.i.assigningCategoryStyle = delegateRemove(this.i.assigningCategoryStyle, this._assigningCategoryStyle_wrapped); this._assigningCategoryStyle_wrapped = null; this._assigningCategoryStyle = null; } this._assigningCategoryStyle = ev; this._assigningCategoryStyle_wrapped = function (o, e) { var outerArgs = new IgcAssigningCategoryStyleEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeAssigningCategoryStyle) { _this.beforeAssigningCategoryStyle(_this, outerArgs); } if (_this._assigningCategoryStyle) { _this._assigningCategoryStyle(_this, outerArgs); } }; this.i.assigningCategoryStyle = delegateCombine(this.i.assigningCategoryStyle, this._assigningCategoryStyle_wrapped); ; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategorySeriesComponent.prototype, "assigningCategoryMarkerStyle", { /** * Event raised when Assigning Category Marker Style */ get: function () { return this._assigningCategoryMarkerStyle; }, set: function (ev) { var _this = this; if (this._assigningCategoryMarkerStyle_wrapped !== null) { this.i.assigningCategoryMarkerStyle = delegateRemove(this.i.assigningCategoryMarkerStyle, this._assigningCategoryMarkerStyle_wrapped); this._assigningCategoryMarkerStyle_wrapped = null; this._assigningCategoryMarkerStyle = null; } this._assigningCategoryMarkerStyle = ev; this._assigningCategoryMarkerStyle_wrapped = function (o, e) { var outerArgs = new IgcAssigningCategoryMarkerStyleEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeAssigningCategoryMarkerStyle) { _this.beforeAssigningCategoryMarkerStyle(_this, outerArgs); } if (_this._assigningCategoryMarkerStyle) { _this._assigningCategoryMarkerStyle(_this, outerArgs); } }; this.i.assigningCategoryMarkerStyle = delegateCombine(this.i.assigningCategoryMarkerStyle, this._assigningCategoryMarkerStyle_wrapped); ; }, enumerable: false, configurable: true }); IgcCategorySeriesComponent._observedAttributesIgcCategorySeriesComponent = null; return IgcCategorySeriesComponent; }(IgcMarkerSeriesComponent)); export { IgcCategorySeriesComponent };