UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

137 lines (136 loc) 4.58 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { Base, markType } from "igniteui-react-core"; import { PieSliceVisualDataList } from "./PieSliceVisualDataList"; import { List$1 } from "igniteui-react-core"; import { StringBuilder } from "igniteui-react-core"; /** * @hidden */ export let PieChartVisualData = /*@__PURE__*/ (() => { class PieChartVisualData extends Base { constructor() { super(); this._slices = null; this._othersSlice = null; this._name = null; this._viewport = null; this._width = 0; this._height = 0; this._others = null; this._radiusFactor = 0; this._leaderLineMargin = 0; this._isViewportScaled = false; this._dipScalingRatio = 0; this.slices = new PieSliceVisualDataList(); this.others = new List$1(Base.$, 0); this.dipScalingRatio = 1; } get slices() { return this._slices; } set slices(a) { this._slices = a; } get othersSlice() { return this._othersSlice; } set othersSlice(a) { this._othersSlice = a; } get name() { return this._name; } set name(a) { this._name = a; } get viewport() { return this._viewport; } set viewport(a) { this._viewport = a; } get width() { return this._width; } set width(a) { this._width = a; } get height() { return this._height; } set height(a) { this._height = a; } get others() { return this._others; } set others(a) { this._others = a; } get radiusFactor() { return this._radiusFactor; } set radiusFactor(a) { this._radiusFactor = a; } get leaderLineMargin() { return this._leaderLineMargin; } set leaderLineMargin(a) { this._leaderLineMargin = a; } get isViewportScaled() { return this._isViewportScaled; } set isViewportScaled(a) { this._isViewportScaled = a; } get dipScalingRatio() { return this._dipScalingRatio; } set dipScalingRatio(a) { this._dipScalingRatio = a; } scaleByViewport() { if (this.isViewportScaled) { return; } this.isViewportScaled = true; for (let a = 0; a < this.slices.count; a++) { this.slices._inner[a].scaleByViewport(this.viewport); } if (this.othersSlice != null) { this.othersSlice.scaleByViewport(this.viewport); } } serialize() { let a = new StringBuilder(0); a.u("{"); a.u("name: " + this.name + ","); a.u("leaderLineMargin: " + this.leaderLineMargin + ","); a.u("radiusFactor: " + this.radiusFactor + ","); a.u("width: " + this.width + ","); a.u("height: " + this.height + ","); a.u("isViewportScaled: " + (this.isViewportScaled ? "true" : "false") + ", "); a.u("slices: ["); for (let b = 0; b < this.slices.count; b++) { if (b != 0) { a.l(", "); } a.l(this.slices._inner[b].serialize()); } a.u("],"); a.u("viewport: { left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height + "}"); a.l(", dipScalingRatio: " + this.dipScalingRatio.toString()); a.u("}"); return a.toString(); } } PieChartVisualData.$t = /*@__PURE__*/ markType(PieChartVisualData, 'PieChartVisualData'); return PieChartVisualData; })();