UNPKG

igniteui-angular-charts

Version:

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

301 lines (299 loc) 12.2 kB
import { __extends } from "tslib"; import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { IgxStyle } from "igniteui-angular-core"; import { MarkerType_$type } from "./MarkerType"; import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType"; import { MarkerOutlineMode_$type } from "./MarkerOutlineMode"; import { MarkerFillMode_$type } from "./MarkerFillMode"; import { IgxShapeSeriesBaseComponent } from "./igx-shape-series-base-component"; import { IgxSeriesComponent } from "./igx-series-component"; import { ScatterPolygonSeries } from "./ScatterPolygonSeries"; import { ensureEnum, brushToString, stringToBrush, toPoint, fromRect } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Series class which renders polygons as Paths based on lists of points in the ItemsSource. */ var IgxScatterPolygonSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxScatterPolygonSeriesComponent, _super); function IgxScatterPolygonSeriesComponent() { return _super.call(this) || this; } IgxScatterPolygonSeriesComponent.prototype.createImplementation = function () { return new ScatterPolygonSeries(); }; Object.defineProperty(IgxScatterPolygonSeriesComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.prototype, "isPolygon", { /** * Gets whether the current series shows a polygon shape. */ get: function () { return this.i.ft; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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(IgxScatterPolygonSeriesComponent.prototype, "hasMarkers", { /** * Returns whether the current series supports visual markers. */ get: function () { return this.i.hasMarkers; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.prototype, "hasVisibleMarkers", { get: function () { return this.i.en; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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 IgxStyle(); 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(IgxScatterPolygonSeriesComponent.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); }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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(IgxScatterPolygonSeriesComponent.prototype, "markerThickness", { /** * Gets or sets thickness of the marker outline */ get: function () { return this.i.abb; }, set: function (v) { this.i.abb = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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(IgxScatterPolygonSeriesComponent.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); }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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); }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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); }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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); }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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); }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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); }, enumerable: false, configurable: true }); Object.defineProperty(IgxScatterPolygonSeriesComponent.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); }, enumerable: false, configurable: true }); IgxScatterPolygonSeriesComponent.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 */ IgxScatterPolygonSeriesComponent.prototype.getSeriesValueMarkerBoundingBox = function (world) { var iv = this.i.xa(toPoint(world)); return fromRect(iv); }; IgxScatterPolygonSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxScatterPolygonSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxScatterPolygonSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxScatterPolygonSeriesComponent, selector: "igx-scatter-polygon-series", inputs: { shapeStyle: "shapeStyle", markerType: "markerType", markerTemplate: "markerTemplate", markerThickness: "markerThickness", actualMarkerTemplate: "actualMarkerTemplate", markerBrush: "markerBrush", actualMarkerBrush: "actualMarkerBrush", markerOutline: "markerOutline", actualMarkerOutline: "actualMarkerOutline", markerCollisionAvoidance: "markerCollisionAvoidance", markerOutlineMode: "markerOutlineMode", markerFillMode: "markerFillMode" }, providers: [{ provide: IgxShapeSeriesBaseComponent, useExisting: forwardRef(function () { return IgxScatterPolygonSeriesComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxScatterPolygonSeriesComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxScatterPolygonSeriesComponent; }(IgxShapeSeriesBaseComponent)); export { IgxScatterPolygonSeriesComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxScatterPolygonSeriesComponent, decorators: [{ type: Component, args: [{ selector: 'igx-scatter-polygon-series', template: "", providers: [{ provide: IgxShapeSeriesBaseComponent, useExisting: forwardRef(function () { return IgxScatterPolygonSeriesComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxScatterPolygonSeriesComponent; }) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { shapeStyle: [{ type: Input }], markerType: [{ type: Input }], markerTemplate: [{ type: Input }], markerThickness: [{ type: Input }], actualMarkerTemplate: [{ type: Input }], markerBrush: [{ type: Input }], actualMarkerBrush: [{ type: Input }], markerOutline: [{ type: Input }], actualMarkerOutline: [{ type: Input }], markerCollisionAvoidance: [{ type: Input }], markerOutlineMode: [{ type: Input }], markerFillMode: [{ type: Input }] } });