igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
226 lines (224 loc) • 7.02 kB
JavaScript
import { IgrSizeScale } from "./igr-size-scale";
import { IgrBrushScale } from "./igr-brush-scale";
import { IgrScatterBase } from "./igr-scatter-base";
import { BubbleSeries } from "./BubbleSeries";
import { ensureBool } from "igniteui-react-core";
/**
* Represents a IgxDataChartComponent bubble series.
*/
export class IgrBubbleSeries extends IgrScatterBase {
createImplementation() {
return new BubbleSeries();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
/**
* 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.ad4;
}
set radiusMemberPath(v) {
this.i.ad4 = v;
}
/**
* Gets or sets the radius size scale for the bubbles.
*/
get radiusScale() {
const r = this.i.ac3;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = IgrSizeScale._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.ac3 = null : this.i.ac3 = v.i;
}
/**
* Gets or sets the Label mapping property for the current series object.
*/
get labelMemberPath() {
return this.i.adu;
}
set labelMemberPath(v) {
this.i.adu = v;
}
/**
* Gets or sets the fill mapping property for the current series object.
*/
get fillMemberPath() {
return this.i.adp;
}
set fillMemberPath(v) {
this.i.adp = v;
}
/**
* Gets or sets the brush scale for the fill brush of markers.
*/
get fillScale() {
const r = this.i.ac0;
if (r == null) {
return null;
}
if (!r.externalObject) {
let e = IgrBrushScale._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.ac0 = null : this.i.ac0 = 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.adc;
}
set fillScaleUseGlobalValues(v) {
this.i.adc = 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.add;
}
set markerOutlineUsesFillScale(v) {
this.i.add = 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.adj;
}
set markerOutlineBrightness(v) {
this.i.adj = +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.adi;
}
set markerBrushBrightness(v) {
this.i.adi = +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.ade;
}
set radiusScaleUseGlobalValues(v) {
this.i.ade = ensureBool(v);
}
/**
* Gets or sets the label displayed before series' radius value in the Data Legend.
*/
get radiusMemberAsLegendLabel() {
return this.i.ad0;
}
set radiusMemberAsLegendLabel(v) {
this.i.ad0 = v;
}
/**
* Gets or sets the label displayed before series' fill value in the Data Legend.
*/
get fillMemberAsLegendLabel() {
return this.i.adl;
}
set fillMemberAsLegendLabel(v) {
this.i.adl = v;
}
/**
* Gets or sets the unit displayed after series' radius value in the Data Legend.
*/
get radiusMemberAsLegendUnit() {
return this.i.ad2;
}
set radiusMemberAsLegendUnit(v) {
this.i.ad2 = v;
}
/**
* Gets or sets the unit displayed after series' fill value in the Data Legend.
*/
get fillMemberAsLegendUnit() {
return this.i.adn;
}
set fillMemberAsLegendUnit(v) {
this.i.adn = 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.ku(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.mi(memberPathName);
return (iv);
}
}