UNPKG

igniteui-react-charts

Version:

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

146 lines (145 loc) 4.61 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, fromEnum, markType } from "igniteui-react-core"; import { StringBuilder } from "igniteui-react-core"; import { isNaN_ } from "igniteui-react-core"; /** * @hidden */ export let DoughnutChartVisualData = /*@__PURE__*/ (() => { class DoughnutChartVisualData extends Base { get series() { return this._series; } set series(a) { this._series = a; } get height() { return this._height; } set height(a) { this._height = a; } get width() { return this._width; } set width(a) { this._width = a; } get holeRadius() { return this._holeRadius; } set holeRadius(a) { this._holeRadius = a; } get dipScalingRatio() { return this._dipScalingRatio; } set dipScalingRatio(a) { this._dipScalingRatio = a; } constructor() { super(); this._series = null; this._height = 0; this._width = 0; this._holeRadius = 0; this._dipScalingRatio = 0; this._viewport = null; this.dipScalingRatio = 1; } scaleByViewport() { if (this.series != null) { for (let a of fromEnum(this.series)) { for (let b of fromEnum(a.rings)) { for (let c of fromEnum(b.arcs)) { for (let d of fromEnum(c.a)) { d.scaleByViewport(this.viewport); } } } } } } serialize() { let a = new StringBuilder(0); let b = true; a.u("{"); if (!isNaN_(this.width)) { if (b) { b = false; } else { a.l(", "); } a.l("width: "); a.u(this.width.toString()); } if (!isNaN_(this.height)) { if (b) { b = false; } else { a.l(", "); } a.l("height: "); a.u(this.height.toString()); } if (!isNaN_(this.holeRadius)) { if (b) { b = false; } else { a.l(", "); } a.l("holeRadius: "); a.u(this.holeRadius.toString()); } if (this.viewport != null) { if (b) { b = false; } else { a.l(", "); } a.u("viewport: {"); a.l("left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height); a.u("}"); } if (this.series != null) { if (b) { b = false; } else { a.l(", "); } a.u("series: ["); for (let c = 0; c < this.series.count; c++) { if (c != 0) { a.l(", "); } a.l(this.series._inner[c].serialize()); } a.u("]"); } if (!b) { a.l(", "); } a.l("dipScalingRatio: " + this.dipScalingRatio.toString()); a.u("}"); return a.toString(); } get viewport() { return this._viewport; } set viewport(a) { this._viewport = a; } } DoughnutChartVisualData.$t = /*@__PURE__*/ markType(DoughnutChartVisualData, 'DoughnutChartVisualData'); return DoughnutChartVisualData; })();