UNPKG

igniteui-angular-charts

Version:

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

269 lines (267 loc) 10.7 kB
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { IgxSizeScaleComponent } from "./igx-size-scale-component"; import { IgxBrushScaleComponent } from "./igx-brush-scale-component"; import { IgxScatterBaseComponent } from "./igx-scatter-base-component"; import { IgxMarkerSeriesComponent } from "./igx-marker-series-component"; import { IgxSeriesComponent } from "./igx-series-component"; import { BubbleSeries } from "./BubbleSeries"; import { ensureBool } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents a IgxDataChartComponent bubble series. */ export class IgxBubbleSeriesComponent extends IgxScatterBaseComponent { createImplementation() { return new BubbleSeries(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } /** * 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.ae5; } set radiusMemberPath(v) { this.i.ae5 = v; } /** * Gets or sets the radius size scale for the bubbles. */ get radiusScale() { const r = this.i.ad4; if (r == null) { return null; } if (!r.externalObject) { let e = IgxSizeScaleComponent._createFromInternal(r); if (e) { e._implementation = r; } Object.defineProperty(r, 'externalObject', { value: e, enumerable: false, configurable: true, writable: true }); } return r.externalObject; } set radiusScale(v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.ad4 = null : this.i.ad4 = v.i; } /** * Gets or sets the Label mapping property for the current series object. */ get labelMemberPath() { return this.i.aev; } set labelMemberPath(v) { this.i.aev = v; } /** * Gets or sets the fill mapping property for the current series object. */ get fillMemberPath() { return this.i.aeq; } set fillMemberPath(v) { this.i.aeq = v; } /** * Gets or sets the brush scale for the fill brush of markers. */ get fillScale() { const r = this.i.ad1; if (r == null) { return null; } if (!r.externalObject) { let e = IgxBrushScaleComponent._createFromInternal(r); if (e) { e._implementation = r; } Object.defineProperty(r, 'externalObject', { value: e, enumerable: false, configurable: true, writable: true }); } return r.externalObject; } set fillScale(v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.ad1 = null : this.i.ad1 = 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.aed; } set fillScaleUseGlobalValues(v) { this.i.aed = ensureBool(v); } /** * 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.aee; } set markerOutlineUsesFillScale(v) { this.i.aee = ensureBool(v); } /** * 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.aek; } set markerOutlineBrightness(v) { this.i.aek = +v; } /** * 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.aej; } set markerBrushBrightness(v) { this.i.aej = +v; } /** * 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.aef; } set radiusScaleUseGlobalValues(v) { this.i.aef = ensureBool(v); } /** * Gets or sets the label displayed before series' radius value in the Data Legend. */ get radiusMemberAsLegendLabel() { return this.i.ae1; } set radiusMemberAsLegendLabel(v) { this.i.ae1 = v; } /** * Gets or sets the label displayed before series' fill value in the Data Legend. */ get fillMemberAsLegendLabel() { return this.i.aem; } set fillMemberAsLegendLabel(v) { this.i.aem = v; } /** * Gets or sets the unit displayed after series' radius value in the Data Legend. */ get radiusMemberAsLegendUnit() { return this.i.ae3; } set radiusMemberAsLegendUnit(v) { this.i.ae3 = v; } /** * Gets or sets the unit displayed after series' fill value in the Data Legend. */ get fillMemberAsLegendUnit() { return this.i.aeo; } set fillMemberAsLegendUnit(v) { this.i.aeo = 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.k1(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.mq(memberPathName); return (iv); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0-rc.1", ngImport: i0, type: IgxBubbleSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.0-rc.1", type: IgxBubbleSeriesComponent, isStandalone: true, selector: "igx-bubble-series", inputs: { radiusMemberPath: "radiusMemberPath", radiusScale: "radiusScale", labelMemberPath: "labelMemberPath", fillMemberPath: "fillMemberPath", fillScale: "fillScale", fillScaleUseGlobalValues: "fillScaleUseGlobalValues", markerOutlineUsesFillScale: "markerOutlineUsesFillScale", markerOutlineBrightness: "markerOutlineBrightness", markerBrushBrightness: "markerBrushBrightness", radiusScaleUseGlobalValues: "radiusScaleUseGlobalValues", radiusMemberAsLegendLabel: "radiusMemberAsLegendLabel", fillMemberAsLegendLabel: "fillMemberAsLegendLabel", radiusMemberAsLegendUnit: "radiusMemberAsLegendUnit", fillMemberAsLegendUnit: "fillMemberAsLegendUnit" }, providers: [{ provide: IgxScatterBaseComponent, useExisting: forwardRef(() => IgxBubbleSeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxBubbleSeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxBubbleSeriesComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0-rc.1", ngImport: i0, type: IgxBubbleSeriesComponent, decorators: [{ type: Component, args: [{ selector: 'igx-bubble-series', template: ``, providers: [{ provide: IgxScatterBaseComponent, useExisting: forwardRef(() => IgxBubbleSeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxBubbleSeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxBubbleSeriesComponent) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: () => [], propDecorators: { radiusMemberPath: [{ type: Input }], radiusScale: [{ type: Input }], labelMemberPath: [{ type: Input }], fillMemberPath: [{ type: Input }], fillScale: [{ type: Input }], fillScaleUseGlobalValues: [{ type: Input }], markerOutlineUsesFillScale: [{ type: Input }], markerOutlineBrightness: [{ type: Input }], markerBrushBrightness: [{ type: Input }], radiusScaleUseGlobalValues: [{ type: Input }], radiusMemberAsLegendLabel: [{ type: Input }], fillMemberAsLegendLabel: [{ type: Input }], radiusMemberAsLegendUnit: [{ type: Input }], fillMemberAsLegendUnit: [{ type: Input }] } });