igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
272 lines (270 loc) • 11.5 kB
JavaScript
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 let IgxBubbleSeriesComponent = /*@__PURE__*/ (() => {
class IgxBubbleSeriesComponent extends IgxScatterBaseComponent {
constructor() {
super();
}
createImplementation() {
return new BubbleSeries();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
/**
* Gets whether the series has only marker as visuals
*/
get hasOnlyMarkers() {
return this.i.ei;
}
get isColoredItemwise() {
return this.i.isColoredItemwise;
}
/**
* Gets or sets the radius mapping property for the current series object.
*/
get radiusMemberPath() {
return this.i.ads;
}
set radiusMemberPath(v) {
this.i.ads = v;
}
/**
* Gets or sets the radius size scale for the bubbles.
*/
get radiusScale() {
const r = this.i.acr;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = IgxSizeScaleComponent._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.acr = null : this.i.acr = v.i;
}
/**
* Gets or sets the Label mapping property for the current series object.
*/
get labelMemberPath() {
return this.i.adi;
}
set labelMemberPath(v) {
this.i.adi = v;
}
/**
* Gets or sets the fill mapping property for the current series object.
*/
get fillMemberPath() {
return this.i.add;
}
set fillMemberPath(v) {
this.i.add = v;
}
/**
* Gets or sets the brush scale for the fill brush of markers.
*/
get fillScale() {
const r = this.i.aco;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = IgxBrushScaleComponent._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.aco = null : this.i.aco = 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.ac0;
}
set fillScaleUseGlobalValues(v) {
this.i.ac0 = 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.ac1;
}
set markerOutlineUsesFillScale(v) {
this.i.ac1 = 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.ac7;
}
set markerOutlineBrightness(v) {
this.i.ac7 = +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.ac6;
}
set markerBrushBrightness(v) {
this.i.ac6 = +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.ac2;
}
set radiusScaleUseGlobalValues(v) {
this.i.ac2 = ensureBool(v);
}
/**
* Gets or sets the label displayed before series' radius value in the Data Legend.
*/
get radiusMemberAsLegendLabel() {
return this.i.ado;
}
set radiusMemberAsLegendLabel(v) {
this.i.ado = v;
}
/**
* Gets or sets the label displayed before series' fill value in the Data Legend.
*/
get fillMemberAsLegendLabel() {
return this.i.ac9;
}
set fillMemberAsLegendLabel(v) {
this.i.ac9 = v;
}
/**
* Gets or sets the unit displayed after series' radius value in the Data Legend.
*/
get radiusMemberAsLegendUnit() {
return this.i.adq;
}
set radiusMemberAsLegendUnit(v) {
this.i.adq = v;
}
/**
* Gets or sets the unit displayed after series' fill value in the Data Legend.
*/
get fillMemberAsLegendUnit() {
return this.i.adb;
}
set fillMemberAsLegendUnit(v) {
this.i.adb = 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.kp(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.mc(memberPathName);
return (iv);
}
}
IgxBubbleSeriesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxBubbleSeriesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxBubbleSeriesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxBubbleSeriesComponent, 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 });
return IgxBubbleSeriesComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", 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: function () { return []; }, 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
}] } });