UNPKG

igniteui-react-charts

Version:

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

112 lines (111 loc) 4.01 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"; /** * @hidden */ export let PointerTooltipVisualData = /*@__PURE__*/ (() => { class PointerTooltipVisualData extends Base { constructor() { super(...arguments); this._boxShape = null; this._pointerFillShape = null; this._pointerOutlineShape = null; this._offsetX = 0; this._offsetY = 0; this._categoryNames = null; this._content = null; this._viewport = null; } get boxShape() { return this._boxShape; } set boxShape(a) { this._boxShape = a; } get pointerFillShape() { return this._pointerFillShape; } set pointerFillShape(a) { this._pointerFillShape = a; } get pointerOutlineShape() { return this._pointerOutlineShape; } set pointerOutlineShape(a) { this._pointerOutlineShape = a; } get offsetX() { return this._offsetX; } set offsetX(a) { this._offsetX = a; } get offsetY() { return this._offsetY; } set offsetY(a) { this._offsetY = a; } get categoryNames() { return this._categoryNames; } set categoryNames(a) { this._categoryNames = a; } get content() { return this._content; } set content(a) { this._content = a; } serialize() { let a = ""; if (this.categoryNames != null) { for (let b of fromEnum(this.categoryNames)) { a += "\"" + b + "\","; } if (a != "") { a = a.substr(0, a.length - 1); } } let c = "null"; let d = this.content; if (d != null) { c = d.serialize(); } let e = new StringBuilder(0); e.u("{"); e.u("offsetX: " + this.offsetX + ", "); e.u("offsetY: " + this.offsetY + ", "); e.u("boxShape: " + this.boxShape.serialize() + ", "); e.u("pointerFillShape: " + this.pointerFillShape.serialize() + ", "); e.u("viewport: { left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height + "}, "); e.u("pointerOutlineShape: " + this.pointerOutlineShape.serialize() + ", "); e.u("categoryNames: [" + a + "],"); e.u("content: " + c + ", "); e.u("}"); return e.toString(); } scaleByViewport(a) { this.boxShape.scaleByViewport(this.viewport); this.pointerFillShape.scaleByViewport(this.viewport); this.pointerOutlineShape.scaleByViewport(this.viewport); this.offsetX = (this.offsetX - a.left) / a.width; this.offsetY = (this.offsetY - a.top) / a.height; } get viewport() { return this._viewport; } set viewport(a) { this._viewport = a; } } PointerTooltipVisualData.$t = /*@__PURE__*/ markType(PointerTooltipVisualData, 'PointerTooltipVisualData'); return PointerTooltipVisualData; })();