UNPKG

igniteui-webcomponents-charts

Version:

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

277 lines (275 loc) 10.3 kB
import { IgcSizeScaleComponent } from "./igc-size-scale-component"; import { IgcBrushScaleComponent } from "./igc-brush-scale-component"; import { IgcScatterBaseComponent } from "./igc-scatter-base-component"; import { BubbleSeries } from "./BubbleSeries"; import { getAllPropertyNames, toSpinal, ensureBool } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents a IgxDataChartComponent bubble series. */ export let IgcBubbleSeriesComponent = /*@__PURE__*/ (() => { class IgcBubbleSeriesComponent extends IgcScatterBaseComponent { createImplementation() { return new BubbleSeries(); } /** * @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 (IgcBubbleSeriesComponent._observedAttributesIgcBubbleSeriesComponent == null) { let names = getAllPropertyNames(IgcBubbleSeriesComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcBubbleSeriesComponent._observedAttributesIgcBubbleSeriesComponent = names; } return IgcBubbleSeriesComponent._observedAttributesIgcBubbleSeriesComponent; } static register() { if (!IgcBubbleSeriesComponent._isElementRegistered) { IgcBubbleSeriesComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcBubbleSeriesComponent.htmlTagName, IgcBubbleSeriesComponent); } } /** * Gets whether the series has only marker as visuals */ get hasOnlyMarkers() { return this.i.ek; } get isColoredItemwise() { return this.i.isColoredItemwise; } /** * Gets or sets the radius mapping property for the current series object. */ get radiusMemberPath() { return this.i.ady; } set radiusMemberPath(v) { this.i.ady = v; } /** * Gets or sets the radius size scale for the bubbles. */ get radiusScale() { const r = this.i.acx; if (r == null) { return null; } if (!r.externalObject) { let e = IgcSizeScaleComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set radiusScale(v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.acx = null : this.i.acx = v.i; } /** * Gets or sets the Label mapping property for the current series object. */ get labelMemberPath() { return this.i.ado; } set labelMemberPath(v) { this.i.ado = v; } /** * Gets or sets the fill mapping property for the current series object. */ get fillMemberPath() { return this.i.adj; } set fillMemberPath(v) { this.i.adj = v; } /** * Gets or sets the brush scale for the fill brush of markers. */ get fillScale() { const r = this.i.acu; if (r == null) { return null; } if (!r.externalObject) { let e = IgcBrushScaleComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set fillScale(v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.acu = null : this.i.acu = v.i; } /** * Gets or sets whether or not the FillScale uses global min/max values of FillMemberPath from multiple series. * This setting applies only if multiple series are using the same FillScale. */ get fillScaleUseGlobalValues() { return this.i.ac6; } set fillScaleUseGlobalValues(v) { this.i.ac6 = ensureBool(v); this._a("fillScaleUseGlobalValues", this.i.ac6); } /** * Gets or sets whether or not the marker outline should use FillScale like the marker fill does. * This setting applies only if the current series has a FillScale set and it overrides MarkerOutline setting. */ get markerOutlineUsesFillScale() { return this.i.ac7; } set markerOutlineUsesFillScale(v) { this.i.ac7 = ensureBool(v); this._a("markerOutlineUsesFillScale", this.i.ac7); } /** * Gets or sets brightness of the marker outline. Using negative value will change marker outline to darker color and positive value will change marker outline to brighter color * Note you can use any values between minimum value of -1 (darkest outline) and maximum value of 1 (brightest outline) */ get markerOutlineBrightness() { return this.i.add; } set markerOutlineBrightness(v) { this.i.add = +v; this._a("markerOutlineBrightness", this.i.add); } /** * Gets or sets brightness of the marker fill. Using negative value will change marker fill to darker color and positive value will change marker fill to brighter color * Note you can use any values between minimum value of -1 (darkest fill) and maximum value of 1 (brightest fill) */ get markerBrushBrightness() { return this.i.adc; } set markerBrushBrightness(v) { this.i.adc = +v; this._a("markerBrushBrightness", this.i.adc); } /** * Gets or sets the whether or not the RadiusScale uses global values of RadiusMemberPath from multiple series. * This setting applies only if multiple series are using the same RadiusScale. */ get radiusScaleUseGlobalValues() { return this.i.ac8; } set radiusScaleUseGlobalValues(v) { this.i.ac8 = ensureBool(v); this._a("radiusScaleUseGlobalValues", this.i.ac8); } /** * Gets or sets the label displayed before series' radius value in the Data Legend. */ get radiusMemberAsLegendLabel() { return this.i.adu; } set radiusMemberAsLegendLabel(v) { this.i.adu = v; } /** * Gets or sets the label displayed before series' fill value in the Data Legend. */ get fillMemberAsLegendLabel() { return this.i.adf; } set fillMemberAsLegendLabel(v) { this.i.adf = v; } /** * Gets or sets the unit displayed after series' radius value in the Data Legend. */ get radiusMemberAsLegendUnit() { return this.i.adw; } set radiusMemberAsLegendUnit(v) { this.i.adw = v; } /** * Gets or sets the unit displayed after series' fill value in the Data Legend. */ get fillMemberAsLegendUnit() { return this.i.adh; } set fillMemberAsLegendUnit(v) { this.i.adh = v; } findByName(name) { var baseResult = super.findByName(name); if (baseResult) { return baseResult; } if (this.radiusScale && this.radiusScale.name && this.radiusScale.name == name) { return this.radiusScale; } if (this.fillScale && this.fillScale.name && this.fillScale.name == name) { return this.fillScale; } return null; } _styling(container, component, parent) { super._styling(container, component, parent); this._inStyling = true; if (this.radiusScale && this.radiusScale._styling) { this.radiusScale._styling(container, component, this); } if (this.fillScale && this.fillScale._styling) { this.fillScale._styling(container, component, this); } this._inStyling = false; } getItemValue(item, memberPathName) { let 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 */ getMemberPathValue(memberPathName) { let iv = this.i.mf(memberPathName); return (iv); } } IgcBubbleSeriesComponent._observedAttributesIgcBubbleSeriesComponent = null; IgcBubbleSeriesComponent.htmlTagName = "igc-bubble-series"; IgcBubbleSeriesComponent._isElementRegistered = false; return IgcBubbleSeriesComponent; })();