UNPKG

igniteui-react-charts

Version:

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

343 lines (342 loc) 10.9 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-react-core"; import { PrimitiveVisualDataList } from "igniteui-react-core"; import { PointerTooltipVisualDataList } from "./PointerTooltipVisualDataList"; import { MarkerVisualDataList } from "./MarkerVisualDataList"; import { CalloutVisualDataList } from "./CalloutVisualDataList"; import { List$1 } from "igniteui-react-core"; import { StringBuilder } from "igniteui-react-core"; /** * @hidden */ var SeriesVisualData = /** @class */ /*@__PURE__*/ (function (_super) { __extends(SeriesVisualData, _super); function SeriesVisualData() { var _this = _super.call(this) || this; _this._name = null; _this._type = null; _this._viewport = null; _this._opacity = 0; _this._shapes = null; _this._pointerTooltips = null; _this._markerShapes = null; _this._calloutShapes = null; _this._layers = null; _this._pixels = null; _this._pixelWidth = 0; _this._pixelHeight = 0; _this.shapes = new PrimitiveVisualDataList(); _this.markerShapes = new MarkerVisualDataList(); _this.pointerTooltips = new PointerTooltipVisualDataList(); _this.calloutShapes = new CalloutVisualDataList(); _this.layers = new SeriesVisualDataList(); return _this; } Object.defineProperty(SeriesVisualData.prototype, "name", { get: function () { return this._name; }, set: function (a) { this._name = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "type", { get: function () { return this._type; }, set: function (a) { this._type = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "viewport", { get: function () { return this._viewport; }, set: function (a) { this._viewport = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "opacity", { get: function () { return this._opacity; }, set: function (a) { this._opacity = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "shapes", { get: function () { return this._shapes; }, set: function (a) { this._shapes = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "pointerTooltips", { get: function () { return this._pointerTooltips; }, set: function (a) { this._pointerTooltips = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "markerShapes", { get: function () { return this._markerShapes; }, set: function (a) { this._markerShapes = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "calloutShapes", { get: function () { return this._calloutShapes; }, set: function (a) { this._calloutShapes = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "layers", { get: function () { return this._layers; }, set: function (a) { this._layers = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "pixels", { get: function () { return this._pixels; }, set: function (a) { this._pixels = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "pixelWidth", { get: function () { return this._pixelWidth; }, set: function (a) { this._pixelWidth = a; }, enumerable: false, configurable: true }); Object.defineProperty(SeriesVisualData.prototype, "pixelHeight", { get: function () { return this._pixelHeight; }, set: function (a) { this._pixelHeight = a; }, enumerable: false, configurable: true }); SeriesVisualData.prototype.n = function () { var e_1, _a, e_2, _b, e_3, _c, e_4, _d, e_5, _e; try { for (var _f = __values(fromEnum(this.shapes)), _g = _f.next(); !_g.done; _g = _f.next()) { var a = _g.value; a.scaleByViewport(this.viewport); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_g && !_g.done && (_a = _f.return)) _a.call(_f); } finally { if (e_1) throw e_1.error; } } try { for (var _h = __values(fromEnum(this.markerShapes)), _j = _h.next(); !_j.done; _j = _h.next()) { var b = _j.value; b.i(this.viewport); } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_j && !_j.done && (_b = _h.return)) _b.call(_h); } finally { if (e_2) throw e_2.error; } } try { for (var _k = __values(fromEnum(this.pointerTooltips)), _l = _k.next(); !_l.done; _l = _k.next()) { var c = _l.value; c.scaleByViewport(this.viewport); } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_l && !_l.done && (_c = _k.return)) _c.call(_k); } finally { if (e_3) throw e_3.error; } } try { for (var _m = __values(fromEnum(this.calloutShapes)), _o = _m.next(); !_o.done; _o = _m.next()) { var d = _o.value; d.scaleByViewport(this.viewport); } } catch (e_4_1) { e_4 = { error: e_4_1 }; } finally { try { if (_o && !_o.done && (_d = _m.return)) _d.call(_m); } finally { if (e_4) throw e_4.error; } } try { for (var _p = __values(fromEnum(this.layers)), _q = _p.next(); !_q.done; _q = _p.next()) { var e = _q.value; e.n(); } } catch (e_5_1) { e_5 = { error: e_5_1 }; } finally { try { if (_q && !_q.done && (_e = _p.return)) _e.call(_p); } finally { if (e_5) throw e_5.error; } } }; SeriesVisualData.prototype.serialize = function () { var a = new StringBuilder(0); a.u("{"); if (this.name != null) { a.u("name: \"" + this.name + "\","); } a.u("type: \"" + this.type + "\", "); a.u("opacity: " + this.opacity + ", "); a.u("viewport: { left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height + "}, "); a.u("shapes: ["); for (var b = 0; b < this.shapes.count; b++) { if (b != 0) { a.l(", "); } a.l(this.shapes._inner[b].serialize()); } a.u("],"); a.u("pointerTooltips: ["); for (var c = 0; c < this.pointerTooltips.count; c++) { if (c != 0) { a.l(", "); } a.l(this.pointerTooltips._inner[c].serialize()); } a.u("],"); if (this.calloutShapes != null && this.calloutShapes.count > 0) { a.u("calloutshapes: ["); for (var d = 0; d < this.calloutShapes.count; d++) { if (d != 0) { a.l(", "); } a.l(this.calloutShapes._inner[d].serialize()); } a.u("],"); } a.u("markerShapes: ["); for (var e = 0; e < this.markerShapes.count; e++) { if (e != 0) { a.l(", "); } a.l(this.markerShapes._inner[e].serialize()); } a.u("],"); a.u("layers: ["); for (var f = 0; f < this.layers.count; f++) { if (f != 0) { a.l(", "); } a.l(this.layers._inner[f].serialize()); } a.u("]"); this.o(a); if (this.pixels != null) { a.u(", pixels: ["); for (var g = 0; g < this.pixels.length; g++) { if (g != 0) { a.l(", "); } a.l(this.pixels[g].toString()); } a.u("], "); a.u("pixelWidth: " + this.pixelWidth + ", "); } a.u("}"); return a.toString(); }; SeriesVisualData.prototype.o = function (a) { }; SeriesVisualData.$t = markType(SeriesVisualData, 'SeriesVisualData'); return SeriesVisualData; }(Base)); export { SeriesVisualData }; /** * @hidden */ var SeriesVisualDataList = /** @class */ /*@__PURE__*/ (function (_super) { __extends(SeriesVisualDataList, _super); function SeriesVisualDataList() { return _super.call(this, SeriesVisualData.$, 0) || this; } SeriesVisualDataList.$t = markType(SeriesVisualDataList, 'SeriesVisualDataList', List$1.$.specialize(SeriesVisualData.$)); return SeriesVisualDataList; }(List$1)); export { SeriesVisualDataList };