UNPKG

igniteui-react-charts

Version:

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

1,486 lines 160 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, __read, __spreadArray, __values } from "tslib"; import { Brush } from "igniteui-react-core"; import { XYChart } from "./XYChart"; import { IndicatorPane } from "./IndicatorPane"; import { Base, BaseError, EventArgs, runOn, delegateRemove, delegateCombine, fromEnum, typeCast, EnumUtil, Number_$type, String_$type, enumGetBox, markType, TypeRegistrar, fromEn } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { DataSeriesType_$type } from "igniteui-react-core"; import { IDataSeriesAdapterRule_$type } from "igniteui-react-core"; import { SimpleFinancialPriceSeriesRule } from "igniteui-react-core"; import { SubCollectionsRule } from "igniteui-react-core"; import { XamDataChart } from "./XamDataChart"; import { FinancialChartVolumeType_$type } from "./FinancialChartVolumeType"; import { FinancialChartXAxisMode_$type } from "./FinancialChartXAxisMode"; import { FinancialChartYAxisMode_$type } from "./FinancialChartYAxisMode"; import { FinancialChartType_$type } from "./FinancialChartType"; import { NumericYAxis } from "./NumericYAxis"; import { CategoryAxisBase } from "./CategoryAxisBase"; import { FinancialChartZoomSliderType_$type } from "./FinancialChartZoomSliderType"; import { BrushCollection } from "igniteui-react-core"; import { FinancialChartRangeSelectorOptionCollection } from "./FinancialChartRangeSelectorOptionCollection"; import { ObservableCollection$1 } from "igniteui-react-core"; import { TemplatedHtmlControl } from "./TemplatedHtmlControl"; import { FinancialChartContext } from "./FinancialChartContext"; import { FinancialChartToolbarContext } from "./FinancialChartToolbarContext"; import { FinancialChartViewModel } from "./FinancialChartViewModel"; import { FinancialChartToolbarViewModel } from "./FinancialChartToolbarViewModel"; import { AxisDefaults } from "./AxisDefaults"; import { Defaults } from "./Defaults"; import { BrushUtil } from "igniteui-react-core"; import { Series } from "./Series"; import { Rect } from "igniteui-react-core"; import { Axis } from "./Axis"; import { AxisLabelSettings } from "./AxisLabelSettings"; import { MarkerSeries } from "./MarkerSeries"; import { IZoomableCategoryAxis_$type } from "./IZoomableCategoryAxis"; import { SyncSettings } from "./SyncSettings"; import { SyncManager } from "./SyncManager"; import { FinancialOverlayType_$type } from "./FinancialOverlayType"; import { ArrayExtension } from "igniteui-react-core"; import { FinancialIndicatorType_$type } from "./FinancialIndicatorType"; import { IndicatorDisplayType_$type } from "./IndicatorDisplayType"; import { ITimeRangeSelectorAxis_$type } from "./ITimeRangeSelectorAxis"; import { FinancialChartVisualData } from "./FinancialChartVisualData"; import { FinancialChartCustomIndicatorArgs } from "./FinancialChartCustomIndicatorArgs"; import { ScalerParams } from "./ScalerParams"; import { stringReplace, stringJoin, stringIsNullOrEmpty } from "igniteui-react-core"; import { timeSpanFromDays } from "igniteui-react-core"; import { dateMaxValue, dateMinValue } from "igniteui-react-core"; import { isNaN_, isInfinity } from "igniteui-react-core"; import { FinancialChartTypePicker } from "./FinancialChartTypePicker"; import { FinancialChartIndicatorMenu } from "./FinancialChartIndicatorMenu"; import { TrendLineType_$type } from "igniteui-react-core"; import { FinancialChartIndicatorMenuContext } from "./FinancialChartIndicatorMenuContext"; import { FinancialChartTypePickerContext } from "./FinancialChartTypePickerContext"; import { FinancialChartRangeSelectorContext } from "./FinancialChartRangeSelectorContext"; import { FinancialChartToolbarVisualData } from "./FinancialChartToolbarVisualData"; import { FinancialChartRangeSelectorViewModel } from "./FinancialChartRangeSelectorViewModel"; import { FinancialChartRangeSelectorView } from "./FinancialChartRangeSelectorView"; /** * @hidden */ var FinancialChart = /** @class */ /*@__PURE__*/ (function (_super) { __extends(FinancialChart, _super); function FinancialChart() { var _this = _super.call(this) || this; _this.ai3 = null; _this.al1 = null; _this.alz = null; _this.alw = null; _this.aly = null; _this.al0 = null; _this.alx = null; _this.ah9 = null; _this.amj = null; _this.amk = null; _this.amg = null; _this.aml = null; _this.amm = null; _this.amh = null; _this.ami = null; _this.ajr = null; _this.ak1 = 40; _this.aix = null; _this.aiv = null; _this.aiz = null; _this.ai4 = null; _this.amu = null; _this.ajn = null; _this.akd = false; _this.akc = false; _this.akk = false; _this.ajz = false; _this.al7 = 10; _this.ak8 = NaN; _this.ala = NaN; _this.ak9 = NaN; _this.alb = 0; _this.aif = 0; _this.aii = 0; _this.ak3 = 3; _this.ak6 = NaN; _this.ak4 = NaN; _this.ak5 = NaN; _this.ak7 = NaN; _this.aik = 0; _this.aju = true; _this.aib = 0; _this.ajv = false; _this.aip = null; _this.air = null; _this.akm = null; _this.ajx = true; _this.ajw = false; _this.ajy = false; _this.ajo = null; _this.aim = 1; _this.ahd = null; _this.ahe = null; _this.ahf = null; _this.ahg = null; _this.ahi = null; _this.ahh = null; _this.ahc = null; _this.ahb = null; _this.ak2 = 1; _this.ak0 = 1; _this.akz = 2; _this.aky = 1; _this.ai1 = null; _this.al3 = -2147483648; _this.akx = 2; _this.al6 = 3; _this.al4 = 10; _this.al2 = 30; _this.al5 = 9; _this.ah6 = null; _this.ah7 = null; _this.ah2 = null; _this.applyCustomIndicators = null; _this.aqo = null; _this.alc = 1; _this.ajt = false; _this.ait = null; _this.aku = dateMinValue(); _this.akt = dateMaxValue(); _this.akr = null; _this.ut(); _this.akr = new ObservableCollection$1(Base.$, 0); if (_this.xAxisBreaks != null) { var a = _this.xAxisBreaks; a.collectionChanged = delegateCombine(a.collectionChanged, function (a, b) { return _this.aqd(); }); } _this.apy(); return _this; } FinancialChart.prototype.v8 = function (a, b, c) { _super.prototype.v8.call(this, a, b, c); switch (a) { case "ToolbarTemplate": case "RangeSelectorTemplate": this.aia = new FinancialChartToolbar(this, this.amr); break; case "Toolbar": var d = b; if (d != null) { d.chartTypeChanged = delegateRemove(d.chartTypeChanged, runOn(this, this.apl)); d.trendLineTypeChanged = delegateRemove(d.trendLineTypeChanged, runOn(this, this.apo)); d.volumeTypeChanged = delegateRemove(d.volumeTypeChanged, runOn(this, this.app)); d.l(null); } if (this.aia != null) { this.aia.ac = this.aih; this.aia.ai = this.ec; this.aia.y = this.aic; this.aia.al = this.aka; if (this.aly != null) { this.aia.l(this.aly); } var e = this.aia; e.chartTypeChanged = delegateCombine(e.chartTypeChanged, runOn(this, this.apl)); ; var f = this.aia; f.trendLineTypeChanged = delegateCombine(f.trendLineTypeChanged, runOn(this, this.apo)); var g = this.aia; g.volumeTypeChanged = delegateCombine(g.volumeTypeChanged, runOn(this, this.app)); } break; case "ChartType": if (this.aia != null) { this.aia.y = this.aic; } break; case "VolumeType": if (this.aia != null) { this.aia.ac = this.aih; } break; case "TrendLineType": if (this.aia != null) { this.aia.ai = this.ec; } break; case "IsToolbarVisible": if (this.aia == null) { break; } this.aia.al = this.aka; this.setGridRows(); break; } }; FinancialChart.prototype.app = function (a, b) { this.aih = this.aia.ac; }; FinancialChart.prototype.apo = function (a, b) { this.ec = this.aia.ai; }; FinancialChart.prototype.apl = function (a, b) { this.aic = this.aia.y; }; FinancialChart.prototype.apy = function () { this.ai3 = new IndicatorPane(); this.aiu = TypeRegistrar.create("FinancialLegend"); }; FinancialChart.prototype.provideGrid = function (a) { this.al1 = a; this.aqj(); this.setGridRows(); if (this.aia != null) { this.aia.bg(a); } }; FinancialChart.prototype.onDocumentClick = function (a) { if (this.aia != null) { this.aia.bl(a); } }; FinancialChart.prototype.getContext = function () { var a = this.aia.v(); var b = new FinancialChartContext(); b.vm = new FinancialChartViewModel(); b.vm.toolbar = a; b.container = this.ly; b.toolbarContainer = this.aly; b.legendContainer = this.alx; b.indicatorsContainer = this.alw; b.volumeContainer = this.alz; b.zoomContainer = this.al0; return b; }; FinancialChart.prototype.provideContainer = function (a) { var b = a; if (b != null) { var c = "financialChartMainGrid"; var d = b.createElement("div"); d.setStyleProperty("width", "100%"); d.setStyleProperty("height", "100%"); if (this.aia == null) { this.aia = new FinancialChartToolbar(this, this.amr); } this.aia.w.isIndicatorMenuVisible = this.aj1 && this.aj2; this.aly = b.getSubRenderer(d); this.aia.l(this.aly); var e = b.createElement("div"); e.setStyleProperty("width", "100%"); e.setStyleProperty("height", "100%"); var f = b.createElement("div"); f.setStyleProperty("width", "100%"); f.setStyleProperty("height", "100%"); this.alx = b.getSubRenderer(f); var g = b.createElement("div"); g.setStyleProperty("width", "100%"); g.setStyleProperty("height", "100%"); this.alw = b.getSubRenderer(g); var h = b.createElement("div"); h.setStyleProperty("width", "100%"); h.setStyleProperty("height", "100%"); this.alz = b.getSubRenderer(h); var i = b.createElement("div"); i.setStyleProperty("width", "100%"); i.setStyleProperty("height", "100%"); this.al0 = b.getSubRenderer(i); a = b.getSubRenderer(e); } else { this.aly = null; if (this.aia != null) { this.aia.l(null); } if (this.ajs != null) { this.ajs.provideContainer(null); this.ajs = null; } if (this.aiu != null) { this.aiu.provideContainer(null); } } _super.prototype.provideContainer.call(this, a); if (b != null) { if (this.volumeChart != null) { this.volumeChart.c9.b4(this.alz); } if (this.ai3 != null) { this.ai3.h(this.alw); } if (this.zoomSliderChart != null) { this.zoomSliderChart.c9.b4(this.al0); if (a != null) { this.ao5(); } else { this.ajs = null; } } if (this.aiu != null) { this.aiu.provideContainer(this.alx); } this.setGridRows(); } }; FinancialChart.prototype.ap9 = function (a, b, c) { if (a != null) { a.provideContainer(null); } if (b != null) { b.c9.b4(c); } this.setGridRows(); }; FinancialChart.prototype.aqn = function (a, b) { this.ap9(a, b, this.al0); if (b == null) { return; } this.ao5(); }; FinancialChart.prototype.ao5 = function () { var _this = this; if (this.al0 == null) { return; } if (this.ajs != null) { this.ajs.provideContainer(null); } this.ajs = TypeRegistrar.create("ZoomSlider"); this.ajs.provideContainer(this.al0); var a = this.ajs; a.windowRectChanged = delegateCombine(a.windowRectChanged, function (a, b) { if (_this.dataChart != null) { _this.dataChart.wo = new Rect(0, _this.ajs.windowRect.left, _this.dataChart.v5.top, _this.ajs.windowRect.width, _this.dataChart.v5.height); } }); this.ao6(); }; FinancialChart.prototype.aql = function (a, b) { this.ap9(a, b, this.alz); }; FinancialChart.prototype.setGridRows = function () { if (this.al1 == null) { return; } var a = new Array(6); a[0] = (this.aka ? this.ali : 0) + "px"; a[1] = this.aj6 ? "min-content" : "0px"; a[2] = "auto"; a[3] = this.indicatorCharts == null || this.indicatorCharts.count == 0 ? "0px" : this.indicatorCharts.count * 150 + "px"; a[4] = this.volumeChart == null ? "0px" : "100px"; a[5] = this.zoomSliderChart == null ? "0px" : "100px"; if (this.ajs != null) { if (a[5] == "0px") { this.ajs.hide(); } else { this.ajs.show(); } } this.al1.setStyleProperty("-ms-grid-rows", stringReplace(stringJoin.apply(void 0, __spreadArray([" "], __read(a), false)), "auto", "1fr")); this.al1.setStyleProperty("grid-template-rows", stringJoin.apply(void 0, __spreadArray([" "], __read(a), false))); if (this.ly == null) { return; } if (this.dataChart != null) { this.dataChart.notifyContainerResized(); } if (this.ai3 != null) { this.ai3.f(); } if (this.volumeChart != null) { this.volumeChart.notifyContainerResized(); } if (this.zoomSliderChart != null) { this.zoomSliderChart.notifyContainerResized(); } if (this.ajs != null) { this.ajs.notifySizeChanged(); } }; FinancialChart.prototype.vd = function () { var e_1, _a; _super.prototype.vd.call(this); this.aap = 1; this.af4 = 0; this.acm = 0; this.agy = null; this.agr = AxisDefaults.g; this.ab6 = AxisDefaults.e; this.ab5 = AxisDefaults.f; this.ags = AxisDefaults.j; this.ago = null; this.aqp = AxisDefaults.h; this.alv = AxisDefaults.b; this.finalValueAnnotationsVisible = true; this.crosshairsAnnotationEnabled = true; this.gq = false; this.crosshairsDisplayMode = 0; this.jq = Defaults.j; this.yo = Defaults.ae; this.yj = Defaults.af; this.yk = Defaults.ag; this.ka = NaN; this.j2 = 40; this.g6 = true; this.he = false; if (this.dataChart != null) { var a = this.dataChart.c9.j.e(); this.ahl = a.d; this.ahm = a.e; this.ahk = a.d; this.aqp = this.dataChart.aat; } var b = new BrushCollection(); b.add(((function () { var $ret = new Brush(); $ret.fill = "#8BDC5C"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#8961A9"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#6DB1FF"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#82E9D9"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#EA3C63"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#735656"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#F8CE4F"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#A8A8B7"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#E051A9"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#FF903B"; return $ret; })())); var c = new BrushCollection(); try { for (var _b = __values(fromEnum(b)), _c = _b.next(); !_c.done; _c = _b.next()) { var d = _c.value; c.add(BrushUtil.n(d, 0.3)); } } 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; } } this.ahn = c; this.aho = b; }; FinancialChart.prototype.ap5 = function () { if (this.ai3 != null) { this.ai3.b = null; this.ai3.b = this.indicatorCharts; } this.setGridRows(); }; FinancialChart.prototype.ap6 = function () { this.setGridRows(); }; FinancialChart.prototype.aqf = function () { this.ap5(); }; FinancialChart.prototype.ao4 = function () { if (this.ajs == null || this.zoomSliderChart == null || this.dataChart == null || this.dataChart.series.count == 0) { return; } var a = this.ly.rootWrapper.width(); var b = this.dataChart.wn.left + this.dataChart.wn.width; var c = this.dataChart.wn.left; var d = a - b; this.ajs.startInset = c - this.ajs.trackStartInset; this.ajs.endInset = d - this.ajs.trackEndInset; if (this.ajs.endInset < 0) { var e = this.ajs.endInset; this.ajs.endInset = 0; this.dataChart.h8 += (e * -1); } if (this.ajs.startInset < 0) { var f = this.ajs.startInset; this.ajs.startInset = 0; this.dataChart.h3 += (f * -1); } this.zoomSliderChart.h3 = c; this.zoomSliderChart.h8 = d; this.zoomSliderChart.hq = this.ajs.barExtent; }; FinancialChart.prototype.apv = function () { this.ao4(); }; FinancialChart.prototype.va = function (a) { _super.prototype.va.call(this, a); if (a != null) { a.hp = 0; } }; FinancialChart.prototype.aqq = function (a) { return a.vy(); }; FinancialChart.prototype.aqt = function () { return this.alx == null ? null : this.aqs(this.alx.rootWrapper); }; FinancialChart.prototype.aqr = function (a) { if (a == null || a.d == null) { return null; } return this.aqs(a.d.rootWrapper); }; FinancialChart.prototype.aqs = function (a) { if (a == null) { return null; } var b = a.getOffset(); return new Rect(0, b.left, b.top, a.width(), a.height()); }; FinancialChart.prototype.ald = function () { if (this.al1 == null) { return NaN; } var a = this.al1.getOffset(); return this.al1.width() + (a == null ? 0 : a.left); }; FinancialChart.prototype.vm = function (source_, a, b) { _super.prototype.vm.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.of(source_, a, b); } }; FinancialChart.prototype.vn = function (source_, a, b) { _super.prototype.vn.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.og(source_, a, b); } }; FinancialChart.prototype.vl = function (source_) { _super.prototype.vl.call(this, source_); if (this.zoomSliderChart != null) { this.zoomSliderChart.n8(source_); } }; FinancialChart.prototype.vp = function (source_, a, b, c) { _super.prototype.vp.call(this, source_, a, b, c); if (this.zoomSliderChart != null) { this.zoomSliderChart.oh(source_, a, b, c); } }; FinancialChart.prototype.vg = function (a, b) { _super.prototype.vg.call(this, a, b); if (this.aj7(a)) { a.toolTip = null; } }; Object.defineProperty(FinancialChart.prototype, "aia", { get: function () { return this.ah9; }, set: function (a) { var b = this.aia; if (a != b) { this.ah9 = a; this.v3("Toolbar", b, this.aia); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amq", { get: function () { return this.amj; }, set: function (a) { var b = this.amq; if (a != b) { this.amj = a; this.v3("RangeSelectorTemplate", b, this.amq); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amr", { get: function () { return this.amk; }, set: function (a) { var b = this.amr; if (a != b) { this.amk = a; this.v3("ToolbarTemplate", b, this.amr); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amn", { get: function () { return this.amg; }, set: function (a) { var b = this.amn; if (a != b) { this.amg = a; this.v3("ChartTypePickerTemplate", b, this.amn); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ams", { get: function () { return this.aml; }, set: function (a) { var b = this.ams; if (a != b) { this.aml = a; this.v3("TrendLineTypePickerTemplate", b, this.ams); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amt", { get: function () { return this.amm; }, set: function (a) { var b = this.amt; if (a != b) { this.amm = a; this.v3("VolumeTypePickerTemplate", b, this.amt); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amo", { get: function () { return this.amh; }, set: function (a) { var b = this.amo; if (a != b) { this.amh = a; this.v3("IndicatorMenuTemplate", b, this.amo); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amp", { get: function () { return this.ami; }, set: function (a) { var b = this.amp; if (a != b) { this.ami = a; this.v3("OverlayPickerTemplate", b, this.amp); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ajs", { get: function () { return this.ajr; }, set: function (a) { var b = this.ajs; if (a != b) { this.ajr = a; this.v3("ZoomSlider", b, this.ajs); } }, enumerable: false, configurable: true }); FinancialChart.prototype.get_j2 = function () { return _super.prototype.get_j2.call(this); }; FinancialChart.prototype.set_j2 = function (a) { _super.prototype.set_j2.call(this, a); }; FinancialChart.prototype.get_g6 = function () { return _super.prototype.get_g6.call(this); }; FinancialChart.prototype.set_g6 = function (a) { _super.prototype.set_g6.call(this, a); }; Object.defineProperty(FinancialChart.prototype, "ali", { get: function () { return this.ak1; }, set: function (a) { var b = this.ali; if (a != b) { this.ak1 = a; this.v3("ToolbarHeight", b, this.ali); } }, enumerable: false, configurable: true }); FinancialChart.prototype.aae = function () { return this.xAxis; }; FinancialChart.prototype.aaf = function () { return this.yAxis; }; FinancialChart.prototype.onAttachedToUI = function () { _super.prototype.onAttachedToUI.call(this); if (this.ajs != null) { this.ajs.onAttachedToUI(); } }; FinancialChart.prototype.onDetachedFromUI = function () { _super.prototype.onDetachedFromUI.call(this); if (this.ajs != null) { this.ajs.onDetachedFromUI(); } }; FinancialChart.prototype.be = function (a) { return 20; }; FinancialChart.prototype.get_h2 = function () { return ((function () { var $ret = new List$1(DataSeriesType_$type, 0); $ret.add(20); return $ret; })()); }; Object.defineProperty(FinancialChart.prototype, "h2", { get: function () { return this.get_h2(); }, enumerable: false, configurable: true }); FinancialChart.prototype.get_h1 = function () { return ((function () { var $ret = new List$1(IDataSeriesAdapterRule_$type, 0); $ret.add(new SimpleFinancialPriceSeriesRule()); $ret.add(new SubCollectionsRule()); return $ret; })()); }; Object.defineProperty(FinancialChart.prototype, "h1", { get: function () { return this.get_h1(); }, enumerable: false, configurable: true }); FinancialChart.prototype.ahw = function (a) { return this.ahx(a); }; FinancialChart.prototype.aja = function (a) { return this.ajb(a); }; FinancialChart.prototype.ahv = function (a) { var b = this.ahw(0); b.name = a; return b; }; FinancialChart.prototype.uo = function () { this.xAxis = this.ahv("xAxis"); this.yAxis = this.aja(0); this.yAxis.name = "yAxis"; this.volumeAxis = this.aja(0); this.volumeAxis.name = "volumeAxis"; this.volumeXAxis = this.ahv("volumeXAxis"); this.ako = new List$1(NumericYAxis.$, 0); this.akq = new List$1(CategoryAxisBase.$, 0); this.indicatorAxis = this.aja(0); this.indicatorAxis.name = "indicatorAxis"; this.indicatorXAxis = this.ahv("indicatorXAxis_0"); this.ako.add(this.indicatorAxis); this.akq.add(this.indicatorXAxis); if (this.xAxis.az == null) { this.xAxis.az = new AxisLabelSettings(); } if (this.yAxis.az == null) { this.yAxis.az = new AxisLabelSettings(); } if (this.volumeAxis.az == null) { this.volumeAxis.az = new AxisLabelSettings(); } if (this.volumeXAxis.az == null) { this.volumeAxis.az = new AxisLabelSettings(); } if (this.indicatorAxis.az == null) { this.indicatorAxis.az = new AxisLabelSettings(); } if (this.indicatorXAxis.az == null) { this.indicatorXAxis.az = new AxisLabelSettings(); } this.zoomSliderAxis = this.aja(0); this.zoomSliderAxis.name = "zoomSliderAxis"; this.zoomSliderXAxis = this.ahv("zoomSliderXAxis"); if (this.zoomSliderAxis.az == null) { this.zoomSliderAxis.az = new AxisLabelSettings(); } if (this.zoomSliderXAxis.az == null) { this.zoomSliderXAxis.az = new AxisLabelSettings(); } }; FinancialChart.prototype.ui = function (a, b) { var c = typeCast(MarkerSeries.$, a); if (c != null) { c.xc = this.c2(a, b); } }; FinancialChart.prototype.c1 = function (a) { if (a != null) { return 1; } return _super.prototype.c1.call(this, a); }; FinancialChart.prototype.wy = function (a) { if (a.suggestedSecondaryAxis == 2) { this.yAxis.lo = true; this.yAxis.mm = 10; } }; FinancialChart.prototype.w1 = function () { this.yAxis.lo = this.akh; this.yAxis.mm = this.amf; }; FinancialChart.prototype.aie = function (a) { var b; if (this.aic == 0) { if (a == null || a.index > 0 || stringIsNullOrEmpty(a.getMemberPathFor(12))) { b = 4; } else { b = 2; } } else { b = this.aic; } b = this.aid(b); return b; }; FinancialChart.prototype.aid = function (a) { if ((a == 1 || a == 2)) { if (TypeRegistrar.isRegistered("FinancialPriceSeries")) { return a; } a = 4; } if (a == 4) { if (TypeRegistrar.isRegistered("LineSeries")) { return a; } a = 3; } if (a == 3) { if (TypeRegistrar.isRegistered("ColumnSeries")) { return a; } } return a; }; FinancialChart.prototype.ain = function (a) { if ((a == 2 || a == 3)) { if (TypeRegistrar.isRegistered("FinancialPriceSeries")) { return a; } a = 5; } if (a == 5) { if (TypeRegistrar.isRegistered("LineSeries")) { return a; } a = 6; } if (a == 6) { if (TypeRegistrar.isRegistered("AreaSeries")) { return a; } a = 4; } if (a == 4) { if (TypeRegistrar.isRegistered("ColumnSeries")) { return a; } } return a; }; FinancialChart.prototype.aig = function (a) { if (a == 2) { if (TypeRegistrar.isRegistered("LineSeries")) { return a; } a = 3; } if (a == 3) { if (TypeRegistrar.isRegistered("AreaSeries")) { return a; } a = 1; } if (a == 1) { if (TypeRegistrar.isRegistered("ColumnSeries")) { return a; } } return a; }; FinancialChart.prototype.am2 = function (a) { var b = a.getMemberPathFor(14); if (stringIsNullOrEmpty(b)) { b = a.getMemberPathFor(11); } return b; }; FinancialChart.prototype.ahx = function (axisType_) { if ((this.externalObject)) { return (this.externalObject.createXAxis(axisType_).i); } else { var a = void 0; switch (axisType_) { case 0: if (TypeRegistrar.isRegistered("OrdinalTimeXAxis")) { a = TypeRegistrar.create("OrdinalTimeXAxis"); } else if (TypeRegistrar.isRegistered("TimeXAxis")) { a = TypeRegistrar.create("TimeXAxis"); } else { throw new BaseError(1, "no valid axes loaded"); } return a; case 1: if (TypeRegistrar.isRegistered("TimeXAxis")) { a = TypeRegistrar.create("TimeXAxis"); } else if (TypeRegistrar.isRegistered("OrdinalTimeXAxis")) { a = TypeRegistrar.create("OrdinalTimeXAxis"); } else { throw new BaseError(1, "no valid axes loaded"); } return a; } return null; } }; FinancialChart.prototype.ajb = function (axisType_) { if ((this.externalObject)) { return (this.externalObject.createYAxis(axisType_).i); } else { var a = void 0; switch (axisType_) { case 0: if (TypeRegistrar.isRegistered("NumericYAxis")) { a = TypeRegistrar.create("NumericYAxis"); } else if (TypeRegistrar.isRegistered("PercentChangeYAxis")) { a = TypeRegistrar.create("PercentChangeYAxis"); } else { throw new BaseError(1, "no valid axes loaded"); } return a; case 1: if (TypeRegistrar.isRegistered("PercentChangeYAxis")) { a = TypeRegistrar.create("PercentChangeYAxis"); } else if (TypeRegistrar.isRegistered("NumericYAxis")) { a = TypeRegistrar.create("NumericYAxis"); } else { throw new BaseError(1, "no valid axes loaded"); } return a; } return null; } }; FinancialChart.prototype.ajh = function () { return this.df(1); }; FinancialChart.prototype.aji = function () { return this.df(0); }; FinancialChart.prototype.ajg = function () { return this.df(2); }; FinancialChart.prototype.ajj = function () { return this.df(20); }; Object.defineProperty(FinancialChart.prototype, "aj0", { get: function () { return (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aiy", { get: function () { if (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")) { return TypeRegistrar.create("HorizontalAnchoredCategorySeriesProxy"); } else { throw new BaseError(1, "horizontal series module is not loaded, but is required."); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aj3", { get: function () { return (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aiw", { get: function () { if (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")) { return TypeRegistrar.create("FinancialPriceSeriesProxy"); } else { throw new BaseError(1, "financial series module is not loaded, but is required."); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aj1", { get: function () { return (TypeRegistrar.isRegistered("IndicatorProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ai0", { get: function () { if (TypeRegistrar.isRegistered("IndicatorProxy")) { return TypeRegistrar.create("IndicatorProxy"); } else { throw new BaseError(1, "financial series module is not loaded, but is required."); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aj2", { get: function () { return (TypeRegistrar.isRegistered("OverlayProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ai5", { get: function () { if (TypeRegistrar.isRegistered("OverlayProxy")) { return TypeRegistrar.create("OverlayProxy"); } else { throw new BaseError(1, "overlay series module is not loaded, but is required."); } }, enumerable: false, configurable: true }); FinancialChart.prototype.dc = function (a, b) { var c = this.am2(a); switch (this.aie(a)) { case 3: var d = this.ajh(); this.aiy.setValueMemberPath(d, c); this.aiy.setXAxis(d, this.xAxis); this.aiy.setYAxis(d, this.yAxis); this.aiy.setCategoryMode(d, 1); return d; case 4: var e = this.aji(); this.aiy.setValueMemberPath(e, c); this.aiy.setXAxis(e, this.xAxis); this.aiy.setYAxis(e, this.yAxis); this.aiy.setCategoryMode(e, 1); return e; default: case 1: case 2: var f = this.ajj(); this.aiw.setOpenMemberPath(f, a.getMemberPathFor(11)); this.aiw.setHighMemberPath(f, a.getMemberPathFor(12)); this.aiw.setLowMemberPath(f, a.getMemberPathFor(13)); this.aiw.setCloseMemberPath(f, a.getMemberPathFor(14)); this.aiw.setVolumeMemberPath(f, a.getMemberPathFor(15)); this.aiw.setXAxis(f, this.xAxis); this.aiw.setYAxis(f, this.yAxis); this.aiw.setDisplayType(f, this.aic == 1 ? 1 : 0); this.aiw.setCategoryMode(f, 1); return f; } }; FinancialChart.prototype.w0 = function () { _super.prototype.w0.call(this); this.apt(this.xAxis); this.aqh(false); if (this.aih != 0 && this.volumeChart != null) { this.ap0(); } this.apt(this.volumeXAxis); this.apt(this.indicatorXAxis); this.aqe(); this.aqg(); if (this.aio != 0) { this.ap1(); this.apt(this.zoomSliderXAxis); } }; FinancialChart.prototype.afq = function (a, b) { var e_2, _a; _super.prototype.afq.call(this, a, b); a(this.volumeXAxis); if (this.akq != null) { try { for (var _b = __values(fromEnum(this.akq)), _c = _b.next(); !_c.done; _c = _b.next()) { var c = _c.value; a(c); } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_2) throw e_2.error; } } } var d = true; switch (b) { case "XAxisMajorStroke": case "XAxisMajorStrokeThickness": d = false; break; } if (d) { a(this.zoomSliderXAxis); } }; FinancialChart.prototype.afv = function (a, b) { var e_3, _a; _super.prototype.afv.call(this, a, b); if (b) { a(this.volumeAxis); if (this.ako != null) { try { for (var _b = __values(fromEnum(this.ako)), _c = _b.next(); !_c.done; _c = _b.next()) { var c = _c.value; a(c); } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_3) throw e_3.error; } } } a(this.zoomSliderAxis); } }; FinancialChart.prototype.apx = function (a) { var b = typeCast(IZoomableCategoryAxis_$type, this.xAxis); if (b != null) { a(b); } }; FinancialChart.prototype.aft = function (a) { _super.prototype.aft.call(this, a); this.afk(this.volumeXAxis, a); this.afk(this.indicatorXAxis, a); this.afk(this.zoomSliderXAxis, a); }; FinancialChart.prototype.afy = function (a) { _super.prototype.afy.call(this, a); this.afk(this.volumeAxis, a); this.afk(this.indicatorAxis, a); this.afk(this.zoomSliderAxis, a); }; FinancialChart.prototype.afw = function (a) { _super.prototype.afw.call(this, a); this.afj(this.volumeAxis, a); this.afj(this.indicatorAxis, a); this.afj(this.zoomSliderAxis, a); }; FinancialChart.prototype.afr = function (a) { _super.prototype.afr.call(this, a); this.afj(this.volumeXAxis, a); this.afj(this.indicatorXAxis, a); this.afj(this.zoomSliderXAxis, a); }; FinancialChart.prototype.u9 = function (a) { var _this = this; _super.prototype.u9.call(this, a); if (a == null) { return; } if (a == this.zoomSliderChart) { a.xj = a.xm = false; a.legend = null; if (this.dataChart != null) { a.ag = this.dataChart.ag; a.aj = this.dataChart.aj; } } else { SyncManager.d(a, ((function () { var $ret = new SyncSettings(); $ret.syncChannel = _this.anx(); $ret.synchronizeHorizontally = true; $ret.synchronizeVertically = false; return $ret; })())); SyncManager.c(a); } a.cw = 2; }; FinancialChart.prototype.anx = function () { if (this.amu == null) { FinancialChart.ame++; this.amu = FinancialChart.ame.toString(); } return this.amu; }; FinancialChart.prototype.apf = function (a, b) { this.ao1(); this.apv(); }; FinancialChart.prototype.ao1 = function () { var e_4, _a; if (this.yAxis.b8()) { return; } var a = this.yAxis.aw.bd; if (this.aih != 0) { a = Math.max(a, this.volumeAxis.aw.bd); } try { for (var _b = __values(fromEnum(this.ako)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; a = Math.max(a, b.aw.bd); } } catch (e_4_1) { e_4 = { error: e_4_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_4) throw e_4.error; } } this.ao2(a); }; FinancialChart.prototype.ao2 = function (a) { var e_5, _a; if (this.yAxis.b8()) { return; } this.yAxis.eu = this.volumeAxis.eu = a; try { for (var _b = __values(fromEnum(this.ako)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; b.eu = a; } } catch (e_5_1) { e_5 = { error: e_5_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_5) throw e_5.error; } } this.zoomSliderAxis.eu = this.yAxis.eu; }; FinancialChart.prototype.ao7 = function (a) { if (this.indicatorCharts == null) { return; } for (var b = 0; b < this.indicatorCharts.count; b++) { var c = this.indicatorCharts._inner[b]; for (var d = 0; d < c.series.count; d++) { var e = c.series._inner[d]; if (!(this.aj5(e))) { continue; } a(c.series._inner[d], b); } } }; FinancialChart.prototype.apa = function (a) { if (this.volumeChart == null) { return; } for (var b = 0; b < this.volumeChart.series.count; b++) { var c = this.volumeChart.series._inner[b]; if (c.et) { continue; } a(this.volumeChart.series._inner[b], b); } }; FinancialChart.prototype.ao8 = function (a) { if (this.dataChart == null) { return; } for (var b = 0; b < this.dataChart.series.count; b++) { var c = this.dataChart.series._inner[b]; if (!this.aj7(c)) { continue; } a(c, b); } }; FinancialChart.prototype.ao9 = function (a, b) { if (this.dataChart == null) { return; } for (var c = 0; c < this.dataChart.series.count; c++) { var d = this.dataChart.series._inner[c]; if (this.aj7(d)) { continue; } var e = this.al8(d, c); a(d, e); } if (b) { this.apb(a); } }; FinancialChart.prototype.apb = function (a) { if (this.zoomSliderChart == null) { return; } for (var b = 0; b < this.zoomSliderChart.series.count; b++) { var c = this.zoomSliderChart.series._inner[b]; if (c.et) { continue; } a(this.zoomSliderChart.series._inner[b], b); } }; FinancialChart.prototype.al8 = function (a, b) { if (a.da != this.dataChart) { return b; } var c = this.bf == null || this.bf.dataSeries == null ? 0 : this.bf.dataSeries.count; var d = this.ais == null ? 0 : this.ais.count; return b - (c * d); }; FinancialChart.prototype.uy = function (a) { _super.prototype.uy.call(this, a); this.apa(a); this.ao7(a); this.apb(a); }; Object.defineProperty(FinancialChart.prototype, "volumeChart", { get: function () { return this.ajn; }, set: function (a) { var b = this.volumeChart; if (a != b) { this.ajn = a; this.v3("VolumeChart", b, this.volumeChart); } }, enumerable: false, configurable: true }); FinancialChart.prototype.ap0 = function () { if (this.dataChart == null) { return; } this.volumeChart.series.clear(); var a = new List$1(Series.$, 0); var b = -1; for (var c = 0; c < this.dataChart.series.count; c++) { var d = this.dataChart.series._inner[c]; if (this.aj7(d) || d.et) { continue; } b++; var e = void 0; var f = this.aih; f = this.aig(f); switch (f) { case 2: e = this.aji(); break; case 3: