igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
165 lines (163 loc) • 6.38 kB
JavaScript
import { __extends } from "tslib";
import { LegendEmptyValuesMode_$type } from "igniteui-webcomponents-core";
import { IgcAnchoredRadialSeriesComponent } from "./igc-anchored-radial-series-component";
import { RadialPieSeries } from "./RadialPieSeries";
import { getAllPropertyNames, toSpinal, ensureEnum, enumToString, toPoint, fromRect } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent radial pie series.
* Compare values across categories by using radial pie slices.
*/
var IgcRadialPieSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcRadialPieSeriesComponent, _super);
function IgcRadialPieSeriesComponent() {
return _super.call(this) || this;
}
IgcRadialPieSeriesComponent.prototype.createImplementation = function () {
return new RadialPieSeries();
};
Object.defineProperty(IgcRadialPieSeriesComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcRadialPieSeriesComponent.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();
}
};
IgcRadialPieSeriesComponent.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(IgcRadialPieSeriesComponent, "observedAttributes", {
get: function () {
if (IgcRadialPieSeriesComponent._observedAttributesIgcRadialPieSeriesComponent == null) {
var names = getAllPropertyNames(IgcRadialPieSeriesComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcRadialPieSeriesComponent._observedAttributesIgcRadialPieSeriesComponent = names;
}
return IgcRadialPieSeriesComponent._observedAttributesIgcRadialPieSeriesComponent;
},
enumerable: false,
configurable: true
});
IgcRadialPieSeriesComponent.register = function () {
if (!IgcRadialPieSeriesComponent._isElementRegistered) {
IgcRadialPieSeriesComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcRadialPieSeriesComponent.htmlTagName, IgcRadialPieSeriesComponent);
}
};
Object.defineProperty(IgcRadialPieSeriesComponent.prototype, "isPie", {
/**
* Gets whether the current series shows a pie shape.
*/
get: function () {
return this.i.fo;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcRadialPieSeriesComponent.prototype, "isMarkerlessDisplayPreferred", {
/**
* Overridden by derived series classes to indicate when marker-less display is preferred or not.
*/
get: function () {
return this.i.fm;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcRadialPieSeriesComponent.prototype, "radiusX", {
/**
* Gets or sets the x-radius of the ellipse that is used to round the corners of the column.
*/
get: function () {
return this.i.ady;
},
set: function (v) {
this.i.ady = +v;
this._a("radiusX", this.i.ady);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcRadialPieSeriesComponent.prototype, "radiusY", {
/**
* Gets or sets the y-radius of the ellipse that is used to round the corners of the column.
*/
get: function () {
return this.i.adz;
},
set: function (v) {
this.i.adz = +v;
this._a("radiusY", this.i.adz);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcRadialPieSeriesComponent.prototype, "legendLabelMemberPath", {
/**
* Gets or sets the property name that contains the legend labels.
*/
get: function () {
return this.i.ad3;
},
set: function (v) {
this.i.ad3 = v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcRadialPieSeriesComponent.prototype, "legendEmptyValuesMode", {
/**
* Determines display mode for zero values in the legend.
*/
get: function () {
return this.i.adt;
},
set: function (v) {
this.i.adt = ensureEnum(LegendEmptyValuesMode_$type, v);
this._a("legendEmptyValuesMode", enumToString(LegendEmptyValuesMode_$type, this.i.adt));
},
enumerable: false,
configurable: true
});
/**
* For a category plotted series, returns the current width of the items within the categories. This only returns a value if the items have some form of width (e.g. columns, bars, etc.) otherwise 0 is returned.
*/
IgcRadialPieSeriesComponent.prototype.getItemSpan = function () {
var iv = this.i.ix();
return (iv);
};
IgcRadialPieSeriesComponent.prototype.getSeriesValueBoundingBox = function (world) {
var iv = this.i.ws(toPoint(world));
return fromRect(iv);
};
IgcRadialPieSeriesComponent._observedAttributesIgcRadialPieSeriesComponent = null;
IgcRadialPieSeriesComponent.htmlTagName = "igc-radial-pie-series";
IgcRadialPieSeriesComponent._isElementRegistered = false;
return IgcRadialPieSeriesComponent;
}(IgcAnchoredRadialSeriesComponent));
export { IgcRadialPieSeriesComponent };