UNPKG

igniteui-react-charts

Version:

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

92 lines (91 loc) 3.32 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 { PointData } from "igniteui-react-core"; import { SizeData } from "igniteui-react-core"; import { StringBuilder } from "igniteui-react-core"; /** * @hidden */ export let AxisLabelVisualData = /*@__PURE__*/ (() => { class AxisLabelVisualData extends Base { get labelValue() { return this._labelValue; } set labelValue(a) { this._labelValue = a; } get labelPosition() { return this._labelPosition; } set labelPosition(a) { this._labelPosition = a; } get position() { return this._position; } set position(a) { this._position = a; } get panelPosition() { return this._panelPosition; } set panelPosition(a) { this._panelPosition = a; } get appearance() { return this._appearance; } set appearance(a) { this._appearance = a; } get size() { return this._size; } set size(a) { this._size = a; } constructor() { super(); this._labelValue = null; this._labelPosition = 0; this._position = null; this._panelPosition = null; this._appearance = null; this._size = null; this.position = new PointData(NaN, NaN); this.size = new SizeData(NaN, NaN); this.panelPosition = new PointData(NaN, NaN); } serialize() { let a = new StringBuilder(0); a.u("{"); a.u("position: " + "{ x: " + this.position.x + ", y: " + this.position.y + "},"); a.u("size: " + "{ width: " + this.size.width + ", height: " + this.size.height + "},"); a.u("labelPosition: " + this.labelPosition + ","); a.u("appearance: " + (this.appearance != null ? this.appearance.serialize() : "null")); a.u("}"); return a.toString(); } h(a, b) { if (b) { this.labelPosition = (this.labelPosition - a.left) / a.width; } else { this.labelPosition = (this.labelPosition - a.top) / a.height; } let c = (this.position.x - a.left) / a.width; let d = (this.position.y - a.top) / a.height; this.position = new PointData(c, d); let e = (this.size.width) / a.width; let f = (this.size.height) / a.height; this.size = new SizeData(e, f); } } AxisLabelVisualData.$t = /*@__PURE__*/ markType(AxisLabelVisualData, 'AxisLabelVisualData'); return AxisLabelVisualData; })();