igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
237 lines (236 loc) • 8.86 kB
JavaScript
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 } 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 let IgcScatterPolygonSeriesComponent = /*@__PURE__*/ (() => {
class IgcScatterPolygonSeriesComponent extends IgcShapeSeriesBaseComponent {
createImplementation() {
return new ScatterPolygonSeries();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
}
connectedCallback() {
if (super["connectedCallback"]) {
super["connectedCallback"]();
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
}
disconnectedCallback() {
if (super["disconnectedCallback"]) {
super["disconnectedCallback"]();
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
}
static get observedAttributes() {
if (IgcScatterPolygonSeriesComponent._observedAttributesIgcScatterPolygonSeriesComponent == null) {
let names = getAllPropertyNames(IgcScatterPolygonSeriesComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcScatterPolygonSeriesComponent._observedAttributesIgcScatterPolygonSeriesComponent = names;
}
return IgcScatterPolygonSeriesComponent._observedAttributesIgcScatterPolygonSeriesComponent;
}
static register() {
if (!IgcScatterPolygonSeriesComponent._isElementRegistered) {
IgcScatterPolygonSeriesComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcScatterPolygonSeriesComponent.htmlTagName, IgcScatterPolygonSeriesComponent);
}
}
/**
* Gets whether the current series shows a polygon shape.
*/
get isPolygon() {
return this.i.fr;
}
/**
* Overridden by derived series classes to indicate when marker-less display is preferred or not.
*/
get isMarkerlessDisplayPreferred() {
return this.i.fm;
}
/**
* Returns whether the current series supports visual markers.
*/
get hasMarkers() {
return this.i.hasMarkers;
}
get hasVisibleMarkers() {
return this.i.en;
}
/**
* The default style to apply to all Shapes in the series.
*/
get shapeStyle() {
const r = this.i.aby;
if (r == null) {
return null;
}
if (!r.externalObject) {
let 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 shapeStyle(v) {
v == null ? this.i.aby = null : this.i.aby = v.i;
}
/**
* 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 markerType() {
return this.i.aam;
}
set markerType(v) {
this.i.aam = ensureEnum(MarkerType_$type, v);
this._a("markerType", enumToString(MarkerType_$type, this.i.aam));
}
/**
* Gets or sets the MarkerTemplate for the current series object.
*/
get markerTemplate() {
return this.i.abd;
}
set markerTemplate(v) {
this.i.abd = v;
}
/**
* Gets or sets thickness of the marker outline
*/
get markerThickness() {
return this.i.aau;
}
set markerThickness(v) {
this.i.aau = +v;
this._a("markerThickness", this.i.aau);
}
/**
* Gets the effective marker template for the current series object.
*/
get actualMarkerTemplate() {
return this.i.abb;
}
set actualMarkerTemplate(v) {
this.i.abb = v;
}
/**
* Gets or sets the brush that specifies how the current series object's marker interiors are painted.
*/
get markerBrush() {
return brushToString(this.i.abu);
}
set markerBrush(v) {
this.i.abu = stringToBrush(v);
this._a("markerBrush", brushToString(this.i.abu));
}
/**
* Gets the effective marker brush for the current series object.
*/
get actualMarkerBrush() {
return brushToString(this.i.abs);
}
set actualMarkerBrush(v) {
this.i.abs = stringToBrush(v);
this._a("actualMarkerBrush", brushToString(this.i.abs));
}
/**
* Gets or sets the brush that specifies how the current series object's marker outlines are painted.
*/
get markerOutline() {
return brushToString(this.i.abv);
}
set markerOutline(v) {
this.i.abv = stringToBrush(v);
this._a("markerOutline", brushToString(this.i.abv));
}
/**
* Gets the effective marker outline for the current series object.
*/
get actualMarkerOutline() {
return brushToString(this.i.abt);
}
set actualMarkerOutline(v) {
this.i.abt = stringToBrush(v);
this._a("actualMarkerOutline", brushToString(this.i.abt));
}
/**
* The desired behavior for markers in this series which are placed too close together for the current view, resulting in a collision.
*/
get markerCollisionAvoidance() {
return this.i.aad;
}
set markerCollisionAvoidance(v) {
this.i.aad = ensureEnum(CollisionAvoidanceType_$type, v);
this._a("markerCollisionAvoidance", enumToString(CollisionAvoidanceType_$type, this.i.aad));
}
/**
* Gets or sets whether the marker outline is based on the marker brush of the series rather than the marker outlines collection.
*/
get markerOutlineMode() {
return this.i.aak;
}
set markerOutlineMode(v) {
this.i.aak = ensureEnum(MarkerOutlineMode_$type, v);
this._a("markerOutlineMode", enumToString(MarkerOutlineMode_$type, this.i.aak));
}
/**
* Gets or sets whether the marker fill is based on the marker outline of the series rather than the marker brushes collection.
*/
get markerFillMode() {
return this.i.aag;
}
set markerFillMode(v) {
this.i.aag = ensureEnum(MarkerFillMode_$type, v);
this._a("markerFillMode", enumToString(MarkerFillMode_$type, this.i.aag));
}
findByName(name) {
var baseResult = super.findByName(name);
if (baseResult) {
return baseResult;
}
if (this.shapeStyle && this.shapeStyle.name && this.shapeStyle.name == name) {
return this.shapeStyle;
}
return null;
}
}
IgcScatterPolygonSeriesComponent._observedAttributesIgcScatterPolygonSeriesComponent = null;
IgcScatterPolygonSeriesComponent.htmlTagName = "igc-scatter-polygon-series";
IgcScatterPolygonSeriesComponent._isElementRegistered = false;
return IgcScatterPolygonSeriesComponent;
})();