igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
55 lines (54 loc) • 1.81 kB
JavaScript
import { __extends } from "tslib";
import { IgrDataContext } from "igniteui-react-core";
import { PieSliceDataContext as PieSliceDataContext_internal } from "./PieSliceDataContext";
import { ensureBool } from "igniteui-react-core";
/**
* DataContext for a pie slice.
*/
var IgrPieSliceDataContext = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrPieSliceDataContext, _super);
function IgrPieSliceDataContext() {
return _super.call(this) || this;
}
IgrPieSliceDataContext.prototype.createImplementation = function () {
return new PieSliceDataContext_internal();
};
Object.defineProperty(IgrPieSliceDataContext.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPieSliceDataContext.prototype, "percentValue", {
/**
* Gets or sets the value of this slice as a percentage of the total pie.
*/
get: function () {
return this.i.percentValue;
},
set: function (v) {
this.i.percentValue = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPieSliceDataContext.prototype, "isOthersSlice", {
/**
* Gets or sets whether this slice is an Others slice or not.
*/
get: function () {
return this.i.isOthersSlice;
},
set: function (v) {
this.i.isOthersSlice = ensureBool(v);
},
enumerable: false,
configurable: true
});
return IgrPieSliceDataContext;
}(IgrDataContext));
export { IgrPieSliceDataContext };