UNPKG

igniteui-webcomponents-charts

Version:

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

318 lines (316 loc) 12.2 kB
import { __extends } from "tslib"; import { IgcStyle } from "igniteui-webcomponents-core"; import { MarkerType_$type } from "./MarkerType"; import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType"; import { MarkerOutlineMode_$type } from "./MarkerOutlineMode"; import { MarkerFillMode_$type } from "./MarkerFillMode"; import { IgcShapeSeriesBaseComponent } from "./igc-shape-series-base-component"; import { ScatterPolygonSeries } from "./ScatterPolygonSeries"; import { getAllPropertyNames, toSpinal, ensureEnum, enumToString, brushToString, stringToBrush, toPoint, fromRect } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Series class which renders polygons as Paths based on lists of points in the ItemsSource. */ export var IgcScatterPolygonSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcScatterPolygonSeriesComponent, _super); function IgcScatterPolygonSeriesComponent() { return _super.call(this) || this; } IgcScatterPolygonSeriesComponent.prototype.createImplementation = function () { return new ScatterPolygonSeries(); }; Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcScatterPolygonSeriesComponent.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(); } }; IgcScatterPolygonSeriesComponent.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(IgcScatterPolygonSeriesComponent, "observedAttributes", { get: function () { if (IgcScatterPolygonSeriesComponent._observedAttributesIgcScatterPolygonSeriesComponent == null) { var names = getAllPropertyNames(IgcScatterPolygonSeriesComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcScatterPolygonSeriesComponent._observedAttributesIgcScatterPolygonSeriesComponent = names; } return IgcScatterPolygonSeriesComponent._observedAttributesIgcScatterPolygonSeriesComponent; }, enumerable: false, configurable: true }); IgcScatterPolygonSeriesComponent.register = function () { if (!IgcScatterPolygonSeriesComponent._isElementRegistered) { IgcScatterPolygonSeriesComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcScatterPolygonSeriesComponent.htmlTagName, IgcScatterPolygonSeriesComponent); } }; Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "isPolygon", { /** * Gets whether the current series shows a polygon shape. */ get: function () { return this.i.ft; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "isMarkerlessDisplayPreferred", { /** * Overridden by derived series classes to indicate when marker-less display is preferred or not. */ get: function () { return this.i.fo; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "hasMarkers", { /** * Returns whether the current series supports visual markers. */ get: function () { return this.i.hasMarkers; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "hasVisibleMarkers", { get: function () { return this.i.en; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "shapeStyle", { /** * The default style to apply to all Shapes in the series. */ get: function () { var r = this.i.acf; if (r == null) { return null; } if (!r.externalObject) { var e = new IgcStyle(); if (r.$type) { e._implementation = r; } else { if (e.i.setNativeElement) { e.i.setNativeElement(r); } } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.acf = null : this.i.acf = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "markerType", { /** * Gets or sets the marker type for the current series object. * If the MarkerTemplate property is set, the setting of the MarkerType property will be ignored. */ get: function () { return this.i.aa2; }, set: function (v) { this.i.aa2 = ensureEnum(MarkerType_$type, v); this._a("markerType", enumToString(MarkerType_$type, this.i.aa2)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "markerTemplate", { /** * Gets or sets the MarkerTemplate for the current series object. */ get: function () { return this.i.abu; }, set: function (v) { this.i.abu = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "markerThickness", { /** * Gets or sets thickness of the marker outline */ get: function () { return this.i.abb; }, set: function (v) { this.i.abb = +v; this._a("markerThickness", this.i.abb); }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "actualMarkerTemplate", { /** * Gets the effective marker template for the current series object. */ get: function () { return this.i.abs; }, set: function (v) { this.i.abs = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "markerBrush", { /** * Gets or sets the brush that specifies how the current series object's marker interiors are painted. */ get: function () { return brushToString(this.i.acb); }, set: function (v) { this.i.acb = stringToBrush(v); this._a("markerBrush", brushToString(this.i.acb)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "actualMarkerBrush", { /** * Gets the effective marker brush for the current series object. */ get: function () { return brushToString(this.i.ab9); }, set: function (v) { this.i.ab9 = stringToBrush(v); this._a("actualMarkerBrush", brushToString(this.i.ab9)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "markerOutline", { /** * Gets or sets the brush that specifies how the current series object's marker outlines are painted. */ get: function () { return brushToString(this.i.acc); }, set: function (v) { this.i.acc = stringToBrush(v); this._a("markerOutline", brushToString(this.i.acc)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "actualMarkerOutline", { /** * Gets the effective marker outline for the current series object. */ get: function () { return brushToString(this.i.aca); }, set: function (v) { this.i.aca = stringToBrush(v); this._a("actualMarkerOutline", brushToString(this.i.aca)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "markerCollisionAvoidance", { /** * The desired behavior for markers in this series which are placed too close together for the current view, resulting in a collision. */ get: function () { return this.i.aat; }, set: function (v) { this.i.aat = ensureEnum(CollisionAvoidanceType_$type, v); this._a("markerCollisionAvoidance", enumToString(CollisionAvoidanceType_$type, this.i.aat)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "markerOutlineMode", { /** * Gets or sets whether the marker outline is based on the marker brush of the series rather than the marker outlines collection. */ get: function () { return this.i.aa0; }, set: function (v) { this.i.aa0 = ensureEnum(MarkerOutlineMode_$type, v); this._a("markerOutlineMode", enumToString(MarkerOutlineMode_$type, this.i.aa0)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcScatterPolygonSeriesComponent.prototype, "markerFillMode", { /** * Gets or sets whether the marker fill is based on the marker outline of the series rather than the marker brushes collection. */ get: function () { return this.i.aaw; }, set: function (v) { this.i.aaw = ensureEnum(MarkerFillMode_$type, v); this._a("markerFillMode", enumToString(MarkerFillMode_$type, this.i.aaw)); }, enumerable: false, configurable: true }); IgcScatterPolygonSeriesComponent.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.shapeStyle && this.shapeStyle.name && this.shapeStyle.name == name) { return this.shapeStyle; } return null; }; /** * If possible, will return the best available value marker bounding box within the series that has the best value match for the world position provided. * @param world * The world coordinates for which to get a value marker bounding box for */ IgcScatterPolygonSeriesComponent.prototype.getSeriesValueMarkerBoundingBox = function (world) { var iv = this.i.xa(toPoint(world)); return fromRect(iv); }; IgcScatterPolygonSeriesComponent._observedAttributesIgcScatterPolygonSeriesComponent = null; IgcScatterPolygonSeriesComponent.htmlTagName = "igc-scatter-polygon-series"; IgcScatterPolygonSeriesComponent._isElementRegistered = false; return IgcScatterPolygonSeriesComponent; }(IgcShapeSeriesBaseComponent));