UNPKG

igniteui-angular-charts

Version:

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

473 lines (472 loc) 15.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 { Base, markType, IList_$type, Number_$type, typeCast, Array_$type, fromEn } from "igniteui-angular-core"; import { List$1 } from "igniteui-angular-core"; import { StringBuilder } from "igniteui-angular-core"; import { boxArray$1 } from "igniteui-angular-core"; import { stringFormat } from "igniteui-angular-core"; import { stringStartsWith } from "igniteui-angular-core"; /** * @hidden */ export let FinancialChartRangeSelectorVisualData = /*@__PURE__*/ (() => { class FinancialChartRangeSelectorVisualData extends Base { constructor() { super(...arguments); this._visibility = null; this._buttonVisibilities = null; this._buttonLabels = null; this._buttonsChecked = null; this._buttonLefts = null; this._buttonTops = null; this._buttonWidths = null; this._buttonHeights = null; this._left = 0; this._top = 0; this._width = 0; this._height = 0; } get visibility() { return this._visibility; } set visibility(a) { this._visibility = a; } get buttonVisibilities() { return this._buttonVisibilities; } set buttonVisibilities(a) { this._buttonVisibilities = a; } get buttonLabels() { return this._buttonLabels; } set buttonLabels(a) { this._buttonLabels = a; } get buttonsChecked() { return this._buttonsChecked; } set buttonsChecked(a) { this._buttonsChecked = a; } get buttonLefts() { return this._buttonLefts; } set buttonLefts(a) { this._buttonLefts = a; } get buttonTops() { return this._buttonTops; } set buttonTops(a) { this._buttonTops = a; } get buttonWidths() { return this._buttonWidths; } set buttonWidths(a) { this._buttonWidths = a; } get buttonHeights() { return this._buttonHeights; } set buttonHeights(a) { this._buttonHeights = a; } get left() { return this._left; } set left(a) { this._left = a; } get top() { return this._top; } set top(a) { this._top = a; } get width() { return this._width; } set width(a) { this._width = a; } get height() { return this._height; } set height(a) { this._height = a; } serialize() { return FinancialChartVisualData.y(["buttonLabels", "buttonsChecked", "buttonLefts", "buttonTops", "buttonWidths", "buttonHeights", "left", "top", "width", "height"], [this.buttonLabels, this.buttonsChecked, this.buttonLefts, this.buttonTops, this.buttonWidths, this.buttonHeights, this.left, this.top, this.width, this.height]); } } FinancialChartRangeSelectorVisualData.$t = markType(FinancialChartRangeSelectorVisualData, 'FinancialChartRangeSelectorVisualData'); return FinancialChartRangeSelectorVisualData; })(); /** * @hidden */ export let FinancialChartEnumPickerVisualData = /*@__PURE__*/ (() => { class FinancialChartEnumPickerVisualData extends Base { constructor() { super(...arguments); this.a = null; this.g = null; this.d = 0; this.e = 0; this.f = 0; this.c = 0; this.b = false; } h() { return FinancialChartVisualData.y(["items", "selectedItem", "left", "top", "width", "height", "isVisible"], [this.a, this.g, this.d, this.e, this.f, this.c, this.b]); } } FinancialChartEnumPickerVisualData.$t = markType(FinancialChartEnumPickerVisualData, 'FinancialChartEnumPickerVisualData'); return FinancialChartEnumPickerVisualData; })(); /** * @hidden */ export let FinancialChartToolbarVisualData = /*@__PURE__*/ (() => { class FinancialChartToolbarVisualData extends Base { constructor() { super(...arguments); this._chartTypePicker = null; this._rangeSelector = null; } get chartTypePicker() { return this._chartTypePicker; } set chartTypePicker(a) { this._chartTypePicker = a; } get rangeSelector() { return this._rangeSelector; } set rangeSelector(a) { this._rangeSelector = a; } serialize() { return FinancialChartVisualData.y(["chartTypePicker", "rangeSelector"], [this.chartTypePicker == null ? null : this.chartTypePicker.h(), this.rangeSelector == null ? null : this.rangeSelector.serialize()]); } } FinancialChartToolbarVisualData.$t = markType(FinancialChartToolbarVisualData, 'FinancialChartToolbarVisualData'); return FinancialChartToolbarVisualData; })(); /** * @hidden */ export let FinancialChartVisualData = /*@__PURE__*/ (() => { class FinancialChartVisualData extends Base { constructor() { super(); this._mainChart = null; this._volumeChart = null; this._indicatorCharts = null; this._toolbar = null; this._zoomChart = null; this._mainChartLeft = 0; this._mainChartTop = 0; this._volumeChartLeft = 0; this._volumeChartTop = 0; this._indicatorChartLefts = null; this._indicatorChartTops = null; this._zoomChartLeft = 0; this._zoomChartTop = 0; this._toolbarLeft = 0; this._toolbarTop = 0; this._toolbarWidth = 0; this._toolbarHeight = 0; this._legendLeft = 0; this._legendTop = 0; this._legendWidth = 0; this._legendHeight = 0; this._legend = null; this.mainChartLeft = NaN; this.mainChartTop = NaN; this.volumeChartLeft = NaN; this.volumeChartTop = NaN; this.zoomChartLeft = NaN; this.zoomChartTop = NaN; this.indicatorChartLefts = new List$1(Number_$type, 0); this.indicatorChartTops = new List$1(Number_$type, 0); } get mainChart() { return this._mainChart; } set mainChart(a) { this._mainChart = a; } get volumeChart() { return this._volumeChart; } set volumeChart(a) { this._volumeChart = a; } get indicatorCharts() { return this._indicatorCharts; } set indicatorCharts(a) { this._indicatorCharts = a; } get toolbar() { return this._toolbar; } set toolbar(a) { this._toolbar = a; } get zoomChart() { return this._zoomChart; } set zoomChart(a) { this._zoomChart = a; } get mainChartLeft() { return this._mainChartLeft; } set mainChartLeft(a) { this._mainChartLeft = a; } get mainChartTop() { return this._mainChartTop; } set mainChartTop(a) { this._mainChartTop = a; } get volumeChartLeft() { return this._volumeChartLeft; } set volumeChartLeft(a) { this._volumeChartLeft = a; } get volumeChartTop() { return this._volumeChartTop; } set volumeChartTop(a) { this._volumeChartTop = a; } get indicatorChartLefts() { return this._indicatorChartLefts; } set indicatorChartLefts(a) { this._indicatorChartLefts = a; } get indicatorChartTops() { return this._indicatorChartTops; } set indicatorChartTops(a) { this._indicatorChartTops = a; } get zoomChartLeft() { return this._zoomChartLeft; } set zoomChartLeft(a) { this._zoomChartLeft = a; } get zoomChartTop() { return this._zoomChartTop; } set zoomChartTop(a) { this._zoomChartTop = a; } get toolbarLeft() { return this._toolbarLeft; } set toolbarLeft(a) { this._toolbarLeft = a; } get toolbarTop() { return this._toolbarTop; } set toolbarTop(a) { this._toolbarTop = a; } get toolbarWidth() { return this._toolbarWidth; } set toolbarWidth(a) { this._toolbarWidth = a; } get toolbarHeight() { return this._toolbarHeight; } set toolbarHeight(a) { this._toolbarHeight = a; } get legendLeft() { return this._legendLeft; } set legendLeft(a) { this._legendLeft = a; } get legendTop() { return this._legendTop; } set legendTop(a) { this._legendTop = a; } get legendWidth() { return this._legendWidth; } set legendWidth(a) { this._legendWidth = a; } get legendHeight() { return this._legendHeight; } set legendHeight(a) { this._legendHeight = a; } get legend() { return this._legend; } set legend(a) { this._legend = a; } ab(a) { if (a != null) { let chart_ = a; chart_.scaleByViewport(); } } scaleByViewport() { this.ab(this.mainChart); this.ab(this.volumeChart); if (this.indicatorCharts != null) { for (let a = 0; a < this.indicatorCharts.count; a++) { this.ab(this.indicatorCharts._inner[a]); } } this.ab(this.zoomChart); } w(a) { if (a != null) { let chart_ = a; return (chart_.serialize()); } return null; } serialize() { let a = new StringBuilder(0); a.u("{"); if (this.volumeChart != null) { a.u("volumeChart: " + this.w(this.volumeChart) + ","); } if (this.zoomChart != null) { a.u("zoomChart: " + this.w(this.zoomChart) + ","); } if (this.indicatorCharts != null) { a.u("indicatorCharts: ["); for (let b = 0; b < this.indicatorCharts.count; b++) { if (b > 0) { a.u(","); } a.l(this.w(this.indicatorCharts._inner[b])); } a.t(); a.u("],"); } if (this.toolbar != null) { a.u("toolbar: " + this.toolbar.serialize() + ","); } if (this.mainChart != null) { a.u("mainChart: " + this.w(this.mainChart) + ","); } a.u("mainChartLeft: " + this.mainChartLeft.toString() + ","); a.u("mainChartTop: " + this.mainChartTop.toString() + ","); a.u("volumeChartLeft: " + this.volumeChartLeft.toString() + ","); a.u("volumeChartTop: " + this.volumeChartTop.toString() + ","); a.u("zoomChartLeft: " + this.zoomChartLeft.toString() + ","); a.u("zoomChartTop: " + this.zoomChartTop.toString() + ","); a.u("toolbarLeft: " + this.toolbarLeft.toString() + ","); a.u("toolbarTop: " + this.toolbarTop.toString() + ","); a.u("toolbarWidth: " + this.toolbarWidth.toString() + ","); a.u("toolbarHeight: " + this.toolbarHeight.toString() + ","); a.u("indicatorChartLefts: ["); for (let c = 0; c < this.indicatorChartLefts.count; c++) { if (c > 0) { a.u(","); } a.k(this.indicatorChartLefts._inner[c]); } a.t(); a.u("],"); a.u("indicatorChartTops: ["); for (let d = 0; d < this.indicatorChartTops.count; d++) { if (d > 0) { a.u(","); } a.k(this.indicatorChartTops._inner[d]); } a.t(); a.u("],"); a.u(stringFormat("legendLeft: {0},", this.legendLeft)); a.u(stringFormat("legendTop: {0},", this.legendTop)); a.u(stringFormat("legendWidth: {0},", this.legendWidth)); a.u(stringFormat("legendHeight: {0},", this.legendHeight)); let e; if (this.legend != null) { e = (this.legend.serialize()); } else { e = "null"; } a.u(stringFormat("legend: {0}", e)); a.u("}"); return a.toString(); } static y(a, b) { let c = new StringBuilder(0); c.u("{"); for (let d = 0; d < a.length; d++) { c.l(a[d] + ": " + FinancialChartVisualData.aa(b[d])); if (d < a.length - 1) { c.l(", "); } c.t(); } c.l("}"); return c.toString(); } static aa(a) { if (a == null) { return "null"; } if (typeof a === 'string' && !stringStartsWith(a, "{")) { return "\"" + a + "\""; } if (typeCast(IList_$type, a) !== null) { return FinancialChartVisualData.z(a); } if (typeCast(Array_$type, a) !== null) { return FinancialChartVisualData.z(boxArray$1(a)); } return a.toString(); } static z(a) { if (a == null) { return "null"; } let b = new StringBuilder(0); b.l("["); let c = 0; for (let d of fromEn(a)) { b.l(FinancialChartVisualData.aa(d)); if (++c < a.count) { b.l(", "); } } b.l("]"); return b.toString(); } } FinancialChartVisualData.$t = markType(FinancialChartVisualData, 'FinancialChartVisualData'); return FinancialChartVisualData; })();