igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
349 lines (347 loc) • 13 kB
JavaScript
import { __extends } from "tslib";
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 var IgcBubbleSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcBubbleSeriesComponent, _super);
function IgcBubbleSeriesComponent() {
return _super.call(this) || this;
}
IgcBubbleSeriesComponent.prototype.createImplementation = function () {
return new BubbleSeries();
};
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcBubbleSeriesComponent.prototype.connectedCallback = function () {
if (_super.prototype["connectedCallback"]) {
_super.prototype["connectedCallback"].call(this);
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
};
IgcBubbleSeriesComponent.prototype.disconnectedCallback = function () {
if (_super.prototype["disconnectedCallback"]) {
_super.prototype["disconnectedCallback"].call(this);
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
};
Object.defineProperty(IgcBubbleSeriesComponent, "observedAttributes", {
get: function () {
if (IgcBubbleSeriesComponent._observedAttributesIgcBubbleSeriesComponent == null) {
var names = getAllPropertyNames(IgcBubbleSeriesComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcBubbleSeriesComponent._observedAttributesIgcBubbleSeriesComponent = names;
}
return IgcBubbleSeriesComponent._observedAttributesIgcBubbleSeriesComponent;
},
enumerable: false,
configurable: true
});
IgcBubbleSeriesComponent.register = function () {
if (!IgcBubbleSeriesComponent._isElementRegistered) {
IgcBubbleSeriesComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcBubbleSeriesComponent.htmlTagName, IgcBubbleSeriesComponent);
}
};
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "hasOnlyMarkers", {
/**
* Gets whether the series has only marker as visuals
*/
get: function () {
return this.i.ek;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "isColoredItemwise", {
get: function () {
return this.i.isColoredItemwise;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "radiusMemberPath", {
/**
* Gets or sets the radius mapping property for the current series object.
*/
get: function () {
return this.i.aee;
},
set: function (v) {
this.i.aee = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "radiusScale", {
/**
* Gets or sets the radius size scale for the bubbles.
*/
get: function () {
var r = this.i.add;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgcSizeScaleComponent._createFromInternal(r);
if (e) {
e._implementation = r;
}
r.externalObject = e;
}
return r.externalObject;
},
set: function (v) {
if (v != null && this._stylingContainer && v._styling)
v._styling(this._stylingContainer, this, this);
v == null ? this.i.add = null : this.i.add = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "labelMemberPath", {
/**
* Gets or sets the Label mapping property for the current series object.
*/
get: function () {
return this.i.ad4;
},
set: function (v) {
this.i.ad4 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "fillMemberPath", {
/**
* Gets or sets the fill mapping property for the current series object.
*/
get: function () {
return this.i.adz;
},
set: function (v) {
this.i.adz = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "fillScale", {
/**
* Gets or sets the brush scale for the fill brush of markers.
*/
get: function () {
var r = this.i.ada;
if (r == null) {
return null;
}
if (!r.externalObject) {
var e = IgcBrushScaleComponent._createFromInternal(r);
if (e) {
e._implementation = r;
}
r.externalObject = e;
}
return r.externalObject;
},
set: function (v) {
if (v != null && this._stylingContainer && v._styling)
v._styling(this._stylingContainer, this, this);
v == null ? this.i.ada = null : this.i.ada = v.i;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "fillScaleUseGlobalValues", {
/**
* 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: function () {
return this.i.adm;
},
set: function (v) {
this.i.adm = ensureBool(v);
this._a("fillScaleUseGlobalValues", this.i.adm);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "markerOutlineUsesFillScale", {
/**
* 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: function () {
return this.i.adn;
},
set: function (v) {
this.i.adn = ensureBool(v);
this._a("markerOutlineUsesFillScale", this.i.adn);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "markerOutlineBrightness", {
/**
* 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: function () {
return this.i.adt;
},
set: function (v) {
this.i.adt = +v;
this._a("markerOutlineBrightness", this.i.adt);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "markerBrushBrightness", {
/**
* 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: function () {
return this.i.ads;
},
set: function (v) {
this.i.ads = +v;
this._a("markerBrushBrightness", this.i.ads);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "radiusScaleUseGlobalValues", {
/**
* 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: function () {
return this.i.ado;
},
set: function (v) {
this.i.ado = ensureBool(v);
this._a("radiusScaleUseGlobalValues", this.i.ado);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "radiusMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series' radius value in the Data Legend.
*/
get: function () {
return this.i.aea;
},
set: function (v) {
this.i.aea = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "fillMemberAsLegendLabel", {
/**
* Gets or sets the label displayed before series' fill value in the Data Legend.
*/
get: function () {
return this.i.adv;
},
set: function (v) {
this.i.adv = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "radiusMemberAsLegendUnit", {
/**
* Gets or sets the unit displayed after series' radius value in the Data Legend.
*/
get: function () {
return this.i.aec;
},
set: function (v) {
this.i.aec = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBubbleSeriesComponent.prototype, "fillMemberAsLegendUnit", {
/**
* Gets or sets the unit displayed after series' fill value in the Data Legend.
*/
get: function () {
return this.i.adx;
},
set: function (v) {
this.i.adx = v;
},
enumerable: false,
configurable: true
});
IgcBubbleSeriesComponent.prototype.findByName = function (name) {
var baseResult = _super.prototype.findByName.call(this, 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;
};
IgcBubbleSeriesComponent.prototype._styling = function (container, component, parent) {
_super.prototype._styling.call(this, 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;
};
IgcBubbleSeriesComponent.prototype.getItemValue = function (item, memberPathName) {
var iv = this.i.kz(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
*/
IgcBubbleSeriesComponent.prototype.getMemberPathValue = function (memberPathName) {
var iv = this.i.mo(memberPathName);
return (iv);
};
IgcBubbleSeriesComponent._observedAttributesIgcBubbleSeriesComponent = null;
IgcBubbleSeriesComponent.htmlTagName = "igc-bubble-series";
IgcBubbleSeriesComponent._isElementRegistered = false;
return IgcBubbleSeriesComponent;
}(IgcScatterBaseComponent));