UNPKG

igniteui-webcomponents-charts

Version:

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

113 lines (112 loc) 3.84 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-webcomponents-core"; import { StringBuilder } from "igniteui-webcomponents-core"; /** * @hidden */ export var ChartDefaultTooltipData = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ChartDefaultTooltipData, _super); function ChartDefaultTooltipData() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._offsetX = 0; _this._offsetY = 0; _this._seriesData = null; _this._viewport = null; return _this; } Object.defineProperty(ChartDefaultTooltipData.prototype, "offsetX", { get: function () { return this._offsetX; }, set: function (a) { this._offsetX = a; }, enumerable: false, configurable: true }); Object.defineProperty(ChartDefaultTooltipData.prototype, "offsetY", { get: function () { return this._offsetY; }, set: function (a) { this._offsetY = a; }, enumerable: false, configurable: true }); Object.defineProperty(ChartDefaultTooltipData.prototype, "seriesData", { get: function () { return this._seriesData; }, set: function (a) { this._seriesData = a; }, enumerable: false, configurable: true }); ChartDefaultTooltipData.prototype.serialize = function () { var e_1, _a; var a = "["; if (this.seriesData != null) { var b = true; try { for (var _b = __values(fromEnum(this.seriesData)), _c = _b.next(); !_c.done; _c = _b.next()) { var c = _c.value; if (b) { b = false; } else { a += ", "; } a += c.serialize(); } } 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; } } a += "]"; } var d = new StringBuilder(0); d.u("{"); if (this.seriesData != null) { d.l("seriesData: "); d.u(a + ", "); } d.u("offsetX: " + this.offsetX + ", "); d.u("offsetY: " + this.offsetY); d.u("}"); return d.toString(); }; ChartDefaultTooltipData.prototype.scaleByViewport = function (a) { this.offsetX = (this.offsetX - a.left) / a.width; this.offsetY = (this.offsetY - a.top) / a.height; }; Object.defineProperty(ChartDefaultTooltipData.prototype, "viewport", { get: function () { return this._viewport; }, set: function (a) { this._viewport = a; }, enumerable: false, configurable: true }); ChartDefaultTooltipData.$t = markType(ChartDefaultTooltipData, 'ChartDefaultTooltipData'); return ChartDefaultTooltipData; }(Base));