UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

163 lines (162 loc) 5.92 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 { __extends, __values } from "tslib"; import { Base, fromEnum, markType } from "igniteui-angular-core"; import { StringBuilder } from "igniteui-angular-core"; /** * @hidden */ var PointerTooltipVisualData = /** @class */ /*@__PURE__*/ (function (_super) { __extends(PointerTooltipVisualData, _super); function PointerTooltipVisualData() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._boxShape = null; _this._pointerFillShape = null; _this._pointerOutlineShape = null; _this._offsetX = 0; _this._offsetY = 0; _this._categoryNames = null; _this._content = null; _this._viewport = null; return _this; } Object.defineProperty(PointerTooltipVisualData.prototype, "boxShape", { get: function () { return this._boxShape; }, set: function (a) { this._boxShape = a; }, enumerable: false, configurable: true }); Object.defineProperty(PointerTooltipVisualData.prototype, "pointerFillShape", { get: function () { return this._pointerFillShape; }, set: function (a) { this._pointerFillShape = a; }, enumerable: false, configurable: true }); Object.defineProperty(PointerTooltipVisualData.prototype, "pointerOutlineShape", { get: function () { return this._pointerOutlineShape; }, set: function (a) { this._pointerOutlineShape = a; }, enumerable: false, configurable: true }); Object.defineProperty(PointerTooltipVisualData.prototype, "offsetX", { get: function () { return this._offsetX; }, set: function (a) { this._offsetX = a; }, enumerable: false, configurable: true }); Object.defineProperty(PointerTooltipVisualData.prototype, "offsetY", { get: function () { return this._offsetY; }, set: function (a) { this._offsetY = a; }, enumerable: false, configurable: true }); Object.defineProperty(PointerTooltipVisualData.prototype, "categoryNames", { get: function () { return this._categoryNames; }, set: function (a) { this._categoryNames = a; }, enumerable: false, configurable: true }); Object.defineProperty(PointerTooltipVisualData.prototype, "content", { get: function () { return this._content; }, set: function (a) { this._content = a; }, enumerable: false, configurable: true }); PointerTooltipVisualData.prototype.serialize = function () { var e_1, _a; var a = ""; if (this.categoryNames != null) { try { for (var _b = __values(fromEnum(this.categoryNames)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; a += "\"" + b + "\","; } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } if (a != "") { a = a.substr(0, a.length - 1); } } var c = "null"; var d = this.content; if (d != null) { c = d.serialize(); } var 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(); }; PointerTooltipVisualData.prototype.scaleByViewport = function (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; }; Object.defineProperty(PointerTooltipVisualData.prototype, "viewport", { get: function () { return this._viewport; }, set: function (a) { this._viewport = a; }, enumerable: false, configurable: true }); PointerTooltipVisualData.$t = markType(PointerTooltipVisualData, 'PointerTooltipVisualData'); return PointerTooltipVisualData; }(Base)); export { PointerTooltipVisualData };