UNPKG

igniteui-react-charts

Version:

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

363 lines (359 loc) 13 kB
import { __extends } from "tslib"; import { delegateCombine, delegateRemove } from "igniteui-react-core"; import { IgrNumericXAxis } from "./igr-numeric-x-axis"; import { IgrNumericYAxis } from "./igr-numeric-y-axis"; import { IgrTriangulationStatusEventArgs } from "igniteui-react-core"; import { IgrSeries } from "./igr-series"; /** * Base class for series which triangulate XY data prior to rendering. */ var IgrScatterTriangulationSeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrScatterTriangulationSeries, _super); function IgrScatterTriangulationSeries(props) { var _this = _super.call(this, props) || this; _this._xAxisName = null; _this._yAxisName = null; _this._triangulationStatusChanged = null; _this._triangulationStatusChanged_wrapped = null; return _this; } Object.defineProperty(IgrScatterTriangulationSeries.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.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.yb; }, set: function (v) { this.i.yb = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.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.yj; }, set: function (v) { this.i.yj = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.prototype, "xAxis", { /** * The X-Axis for this series. */ get: function () { var r = this.i.w9; if (r == null) { return null; } if (!r.externalObject) { var e = IgrNumericXAxis._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.w9 = null : this.i.w9 = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.prototype, "xAxisName", { /** * Gets or sets the name to use to resolve xAxis from markup. */ get: function () { return this._xAxisName; }, set: function (v) { this._xAxisName = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.prototype, "yAxis", { /** * The Y-Axis for this series. */ get: function () { var r = this.i.xa; if (r == null) { return null; } if (!r.externalObject) { var e = IgrNumericYAxis._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.xa = null : this.i.xa = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.prototype, "yAxisName", { /** * Gets or sets the name to use to resolve yAxis from markup. */ get: function () { return this._yAxisName; }, set: function (v) { this._yAxisName = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.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(IgrScatterTriangulationSeries.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.xz; }, set: function (v) { this.i.xz = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.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.x1; }, set: function (v) { this.i.x1 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.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.x3; }, set: function (v) { this.i.x3 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.prototype, "isShape", { /** * Gets whether or not this series is a shape series */ get: function () { return this.i.fy; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.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(IgrScatterTriangulationSeries.prototype, "xMemberAsLegendLabel", { /** * Gets or sets the label displayed before series X value in the Data Legend. */ get: function () { return this.i.x7; }, set: function (v) { this.i.x7 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.prototype, "yMemberAsLegendLabel", { /** * Gets or sets the label displayed before series Y value in the Data Legend. */ get: function () { return this.i.yf; }, set: function (v) { this.i.yf = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.prototype, "xMemberAsLegendUnit", { /** * Gets or sets the unit after displayed after series X value in the Data Legend. */ get: function () { return this.i.x9; }, set: function (v) { this.i.x9 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrScatterTriangulationSeries.prototype, "yMemberAsLegendUnit", { /** * Gets or sets the unit after displayed after series Y value in the Data Legend. */ get: function () { return this.i.yh; }, set: function (v) { this.i.yh = v; }, enumerable: false, configurable: true }); IgrScatterTriangulationSeries.prototype.bindAxes = function (axes) { _super.prototype.bindAxes.call(this, axes); for (var i = 0; i < axes.length; i++) { if (this.xAxisName && this.xAxisName.length > 0 && axes[i].name == this.xAxisName) { this.xAxis = axes[i]; } } for (var i = 0; i < axes.length; i++) { if (this.yAxisName && this.yAxisName.length > 0 && axes[i].name == this.yAxisName) { this.yAxis = axes[i]; } } }; IgrScatterTriangulationSeries.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; }; IgrScatterTriangulationSeries.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; }; IgrScatterTriangulationSeries.prototype.getItemValue = function (item, memberPathName) { var iv = this.i.ku(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 */ IgrScatterTriangulationSeries.prototype.getMemberPathValue = function (memberPathName) { var iv = this.i.mi(memberPathName); return (iv); }; /** * Determine if object can be used as YAxis * @param axis * The object to check */ IgrScatterTriangulationSeries.prototype.canUseAsYAxis = function (axis) { var iv = this.i.xr(axis); return (iv); }; /** * Determine if object can be used as XAxis * @param axis * The object to check */ IgrScatterTriangulationSeries.prototype.canUseAsXAxis = function (axis) { var iv = this.i.xq(axis); return (iv); }; Object.defineProperty(IgrScatterTriangulationSeries.prototype, "triangulationStatusChanged", { /** * Raised when the status of an ongoing Triangulation has changed. */ get: function () { return this._triangulationStatusChanged; }, set: function (ev) { var _this = this; if (this._triangulationStatusChanged_wrapped !== null) { this.i.triangulationStatusChanged = delegateRemove(this.i.triangulationStatusChanged, this._triangulationStatusChanged_wrapped); this._triangulationStatusChanged_wrapped = null; this._triangulationStatusChanged = null; } this._triangulationStatusChanged = ev; this._triangulationStatusChanged_wrapped = function (o, e) { var outerArgs = new IgrTriangulationStatusEventArgs(); outerArgs._provideImplementation(e); if (_this.beforeTriangulationStatusChanged) { _this.beforeTriangulationStatusChanged(_this, outerArgs); } if (_this._triangulationStatusChanged) { _this._triangulationStatusChanged(_this, outerArgs); } }; this.i.triangulationStatusChanged = delegateCombine(this.i.triangulationStatusChanged, this._triangulationStatusChanged_wrapped); ; }, enumerable: false, configurable: true }); return IgrScatterTriangulationSeries; }(IgrSeries)); export { IgrScatterTriangulationSeries };