UNPKG

igniteui-angular-charts

Version:

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

351 lines (347 loc) 13.9 kB
import { __extends } from "tslib"; import { EventEmitter, Output, Component, Input } from '@angular/core'; import { delegateCombine } from "igniteui-angular-core"; import { IgxNumericXAxisComponent } from "./igx-numeric-x-axis-component"; import { IgxNumericYAxisComponent } from "./igx-numeric-y-axis-component"; import { IgxTriangulationStatusEventArgs } from "igniteui-angular-core"; import { IgxSeriesComponent } from "./igx-series-component"; import * as i0 from "@angular/core"; /** * Base class for series which triangulate XY data prior to rendering. */ var IgxScatterTriangulationSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxScatterTriangulationSeriesComponent, _super); function IgxScatterTriangulationSeriesComponent() { var _this = _super.call(this) || this; _this._triangulationStatusChanged = null; return _this; } Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "xMemberPath", { /** * The name of the property from which to extract the X-coordinate for each item in the ItemsSource. */ get: function () { return this.i.x5; }, set: function (v) { this.i.x5 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "yMemberPath", { /** * The name of the property from which to extract the Y-coordinate for each item in the ItemsSource. */ get: function () { return this.i.yd; }, set: function (v) { this.i.yd = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "xAxis", { /** * The X-Axis for this series. */ get: function () { var r = this.i.w3; if (r == null) { return null; } if (!r.externalObject) { var e = IgxNumericXAxisComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.w3 = null : this.i.w3 = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "yAxis", { /** * The Y-Axis for this series. */ get: function () { var r = this.i.w4; if (r == null) { return null; } if (!r.externalObject) { var e = IgxNumericYAxisComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.w4 = null : this.i.w4 = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "trianglesSource", { /** * The source of triangulation data. * This property is optional. If it is left as null, the triangulation will be created based on the items in the ItemsSource. Triangulation is a demanding operation, so the runtime performance will be better when specifying a TriangulationSource, especially when a large number of data items are present. */ get: function () { return this.i.trianglesSource; }, set: function (v) { this.i.trianglesSource = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "triangleVertexMemberPath1", { /** * The name of the property of the TrianglesSource items which, for each triangle, contains the index of the first vertex point in the ItemsSource. */ get: function () { return this.i.xt; }, set: function (v) { this.i.xt = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "triangleVertexMemberPath2", { /** * The name of the property of the TrianglesSource items which, for each triangle, contains the index of the second vertex point in the ItemsSource. */ get: function () { return this.i.xv; }, set: function (v) { this.i.xv = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "triangleVertexMemberPath3", { /** * The name of the property of the TrianglesSource items which, for each triangle, contains the index of the third vertex point in the ItemsSource. */ get: function () { return this.i.xx; }, set: function (v) { this.i.xx = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "isShape", { /** * Gets whether or not this series is a shape series */ get: function () { return this.i.fy; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "isMarkerlessDisplayPreferred", { /** * Overridden by derived series classes to indicate when marker-less display is preferred or not. */ get: function () { return this.i.fm; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "xMemberAsLegendLabel", { /** * Gets or sets the label displayed before series X value in the Data Legend. */ get: function () { return this.i.x1; }, set: function (v) { this.i.x1 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "yMemberAsLegendLabel", { /** * Gets or sets the label displayed before series Y value in the Data Legend. */ get: function () { return this.i.x9; }, set: function (v) { this.i.x9 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "xMemberAsLegendUnit", { /** * Gets or sets the unit after displayed after series X value in the Data Legend. */ get: function () { return this.i.x3; }, set: function (v) { this.i.x3 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "yMemberAsLegendUnit", { /** * Gets or sets the unit after displayed after series Y value in the Data Legend. */ get: function () { return this.i.yb; }, set: function (v) { this.i.yb = v; }, enumerable: false, configurable: true }); IgxScatterTriangulationSeriesComponent.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.xAxis && this.xAxis.name && this.xAxis.name == name) { return this.xAxis; } if (this.yAxis && this.yAxis.name && this.yAxis.name == name) { return this.yAxis; } return null; }; IgxScatterTriangulationSeriesComponent.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, container, component, parent); this._inStyling = true; if (this.xAxis && this.xAxis._styling) { this.xAxis._styling(container, component, this); } if (this.yAxis && this.yAxis._styling) { this.yAxis._styling(container, component, this); } this._inStyling = false; }; IgxScatterTriangulationSeriesComponent.prototype.getItemValue = function (item, memberPathName) { var iv = this.i.kr(item, memberPathName); return (iv); }; /** * Gets the value of a requested member path from the series. * @param memberPathName * The property name of a valid member path for the series */ IgxScatterTriangulationSeriesComponent.prototype.getMemberPathValue = function (memberPathName) { var iv = this.i.mf(memberPathName); return (iv); }; /** * Determine if object can be used as YAxis * @param axis * The object to check */ IgxScatterTriangulationSeriesComponent.prototype.canUseAsYAxis = function (axis) { var iv = this.i.xl(axis); return (iv); }; /** * Determine if object can be used as XAxis * @param axis * The object to check */ IgxScatterTriangulationSeriesComponent.prototype.canUseAsXAxis = function (axis) { var iv = this.i.xk(axis); return (iv); }; Object.defineProperty(IgxScatterTriangulationSeriesComponent.prototype, "triangulationStatusChanged", { /** * Raised when the status of an ongoing Triangulation has changed. */ get: function () { var _this = this; if (this._triangulationStatusChanged == null) { this._triangulationStatusChanged = new EventEmitter(); this.i.triangulationStatusChanged = delegateCombine(this.i.triangulationStatusChanged, function (o, e) { _this._runInZone(function () { var outerArgs = new IgxTriangulationStatusEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeTriangulationStatusChanged) { _this.beforeTriangulationStatusChanged(_this, outerArgs); } _this._triangulationStatusChanged.emit({ sender: _this, args: outerArgs }); }); }); } return this._triangulationStatusChanged; }, enumerable: false, configurable: true }); IgxScatterTriangulationSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxScatterTriangulationSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxScatterTriangulationSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxScatterTriangulationSeriesComponent, selector: "ng-component", inputs: { xMemberPath: "xMemberPath", yMemberPath: "yMemberPath", xAxis: "xAxis", yAxis: "yAxis", trianglesSource: "trianglesSource", triangleVertexMemberPath1: "triangleVertexMemberPath1", triangleVertexMemberPath2: "triangleVertexMemberPath2", triangleVertexMemberPath3: "triangleVertexMemberPath3", xMemberAsLegendLabel: "xMemberAsLegendLabel", yMemberAsLegendLabel: "yMemberAsLegendLabel", xMemberAsLegendUnit: "xMemberAsLegendUnit", yMemberAsLegendUnit: "yMemberAsLegendUnit" }, outputs: { triangulationStatusChanged: "triangulationStatusChanged" }, usesInheritance: true, ngImport: i0, template: "", isInline: true }); return IgxScatterTriangulationSeriesComponent; }(IgxSeriesComponent)); export { IgxScatterTriangulationSeriesComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxScatterTriangulationSeriesComponent, decorators: [{ type: Component, args: [{ template: "", }] }], ctorParameters: function () { return []; }, propDecorators: { xMemberPath: [{ type: Input }], yMemberPath: [{ type: Input }], xAxis: [{ type: Input }], yAxis: [{ type: Input }], trianglesSource: [{ type: Input }], triangleVertexMemberPath1: [{ type: Input }], triangleVertexMemberPath2: [{ type: Input }], triangleVertexMemberPath3: [{ type: Input }], xMemberAsLegendLabel: [{ type: Input }], yMemberAsLegendLabel: [{ type: Input }], xMemberAsLegendUnit: [{ type: Input }], yMemberAsLegendUnit: [{ type: Input }], triangulationStatusChanged: [{ type: Output }] } });