UNPKG

igniteui-webcomponents-charts

Version:

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

238 lines (233 loc) 9.12 kB
import { __extends } from "tslib"; import { IgcColorScaleComponent } from "./igc-color-scale-component"; import { IgcScatterTriangulationSeriesComponent } from "./igc-scatter-triangulation-series-component"; import { ScatterAreaSeries } from "./ScatterAreaSeries"; import { getAllPropertyNames, toSpinal, toPoint } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Series class which draws a colored 2D surface based on a triangulation of XY data with numeric values assigned to each point. */ var IgcScatterAreaSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcScatterAreaSeriesComponent, _super); function IgcScatterAreaSeriesComponent() { return _super.call(this) || this; } IgcScatterAreaSeriesComponent.prototype.createImplementation = function () { return new ScatterAreaSeries(); }; Object.defineProperty(IgcScatterAreaSeriesComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcScatterAreaSeriesComponent.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(); } }; IgcScatterAreaSeriesComponent.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(IgcScatterAreaSeriesComponent, "observedAttributes", { get: function () { if (IgcScatterAreaSeriesComponent._observedAttributesIgcScatterAreaSeriesComponent == null) { var names = getAllPropertyNames(IgcScatterAreaSeriesComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcScatterAreaSeriesComponent._observedAttributesIgcScatterAreaSeriesComponent = names; } return IgcScatterAreaSeriesComponent._observedAttributesIgcScatterAreaSeriesComponent; }, enumerable: false, configurable: true }); IgcScatterAreaSeriesComponent.register = function () { if (!IgcScatterAreaSeriesComponent._isElementRegistered) { IgcScatterAreaSeriesComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcScatterAreaSeriesComponent.htmlTagName, IgcScatterAreaSeriesComponent); } }; Object.defineProperty(IgcScatterAreaSeriesComponent.prototype, "isArea", { /** * Gets whether the current series shows an area shape. */ get: function () { return this.i.ew; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterAreaSeriesComponent.prototype, "colorScale", { /** * Gets or sets ColorScale used to resolve the color values of points in the series. */ get: function () { var r = this.i.y0; if (r == null) { return null; } if (!r.externalObject) { var e = IgcColorScaleComponent._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.y0 = null : this.i.y0 = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterAreaSeriesComponent.prototype, "colorMemberPath", { /** * Gets or sets the name of the property on each data item containing a numeric value which can be converted to a color by the ColorScale. */ get: function () { return this.i.zc; }, set: function (v) { this.i.zc = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterAreaSeriesComponent.prototype, "actualColorScale", { /** * Gets actual color scale that is set on ColorScale property or default ColorScale */ get: function () { var r = this.i.yz; if (r == null) { return null; } if (!r.externalObject) { var e = IgcColorScaleComponent._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.yz = null : this.i.yz = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterAreaSeriesComponent.prototype, "colorMemberAsLegendLabel", { /** * Gets or sets the label displayed before series color value in the Data Legend. */ get: function () { return this.i.y8; }, set: function (v) { this.i.y8 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterAreaSeriesComponent.prototype, "colorMemberAsLegendUnit", { /** * Gets or sets the unit displayed after series color value in the Data Legend. */ get: function () { return this.i.za; }, set: function (v) { this.i.za = v; }, enumerable: false, configurable: true }); IgcScatterAreaSeriesComponent.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.colorScale && this.colorScale.name && this.colorScale.name == name) { return this.colorScale; } if (this.actualColorScale && this.actualColorScale.name && this.actualColorScale.name == name) { return this.actualColorScale; } return null; }; IgcScatterAreaSeriesComponent.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, container, component, parent); this._inStyling = true; if (this.colorScale && this.colorScale._styling) { this.colorScale._styling(container, component, this); } if (this.actualColorScale && this.actualColorScale._styling) { this.actualColorScale._styling(container, component, this); } this._inStyling = false; }; IgcScatterAreaSeriesComponent.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 */ IgcScatterAreaSeriesComponent.prototype.getMemberPathValue = function (memberPathName) { var iv = this.i.mf(memberPathName); return (iv); }; /** * Gets the item that is the best match for the specified world coordinates. * @param world * The world coordinates to use. */ IgcScatterAreaSeriesComponent.prototype.getItem = function (world) { var iv = this.i.ko(toPoint(world)); return (iv); }; /** * Updates ActualColorScale properties when the ColorScale property has changed */ IgcScatterAreaSeriesComponent.prototype.updateActualColorScale = function () { this.i.zj(); }; /** * Attaches an image to the view of this series */ IgcScatterAreaSeriesComponent.prototype.attachImage = function (image) { this.i.zg(image); }; IgcScatterAreaSeriesComponent._observedAttributesIgcScatterAreaSeriesComponent = null; IgcScatterAreaSeriesComponent.htmlTagName = "igc-scatter-area-series"; IgcScatterAreaSeriesComponent._isElementRegistered = false; return IgcScatterAreaSeriesComponent; }(IgcScatterTriangulationSeriesComponent)); export { IgcScatterAreaSeriesComponent };