igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
39 lines (38 loc) • 1.03 kB
JavaScript
import { IgrDataContext } from "igniteui-react-core";
import { PieSliceDataContext as PieSliceDataContext_internal } from "./PieSliceDataContext";
import { ensureBool } from "igniteui-react-core";
/**
* DataContext for a pie slice.
*/
export class IgrPieSliceDataContext extends IgrDataContext {
createImplementation() {
return new PieSliceDataContext_internal();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
}
/**
* Gets or sets the value of this slice as a percentage of the total pie.
*/
get percentValue() {
return this.i.percentValue;
}
set percentValue(v) {
this.i.percentValue = +v;
}
/**
* Gets or sets whether this slice is an Others slice or not.
*/
get isOthersSlice() {
return this.i.isOthersSlice;
}
set isOthersSlice(v) {
this.i.isOthersSlice = ensureBool(v);
}
}