UNPKG

igniteui-react-charts

Version:

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

1,480 lines (1,479 loc) 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.ajv = null; _this.amt = null; _this.amr = null; _this.amo = null; _this.amq = null; _this.ams = null; _this.amp = null; _this.ai1 = null; _this.anb = null; _this.anc = null; _this.am8 = null; _this.and = null; _this.ane = null; _this.am9 = null; _this.ana = null; _this.akj = null; _this.alt = 40; _this.ajp = null; _this.ajn = null; _this.ajr = null; _this.ajw = null; _this.anm = null; _this.akf = null; _this.ak5 = false; _this.ak4 = false; _this.alc = false; _this.akr = false; _this.amz = 10; _this.al0 = NaN; _this.al2 = NaN; _this.al1 = NaN; _this.al3 = 0; _this.ai7 = 0; _this.aja = 0; _this.alv = 3; _this.aly = NaN; _this.alw = NaN; _this.alx = NaN; _this.alz = NaN; _this.ajc = 0; _this.akm = true; _this.ai3 = 0; _this.akn = false; _this.ajh = null; _this.ajj = null; _this.ale = null; _this.akp = true; _this.ako = false; _this.akq = false; _this.akg = null; _this.aje = 1; _this.ah5 = null; _this.ah6 = null; _this.ah7 = null; _this.ah8 = null; _this.aia = null; _this.ah9 = null; _this.ah4 = null; _this.ah3 = null; _this.alu = 1; _this.als = 1; _this.alr = 2; _this.alq = 1; _this.ajt = null; _this.amv = -2147483648; _this.alp = 2; _this.amy = 3; _this.amw = 10; _this.amu = 30; _this.amx = 9; _this.aiy = null; _this.aiz = null; _this.aiu = null; _this.applyCustomIndicators = null; _this.arg = null; _this.al4 = 1; _this.akl = false; _this.ajl = null; _this.alm = dateMinValue(); _this.all = dateMaxValue(); _this.alj = null; _this.u8(); _this.alj = new ObservableCollection$1(Base.$, 0); if (_this.xAxisBreaks != null) { var a = _this.xAxisBreaks; a.collectionChanged = delegateCombine(a.collectionChanged, function (a, b) { return _this.aq5(); }); } _this.aqq(); return _this; } FinancialChart.prototype.wo = function (a, b, c) { _super.prototype.wo.call(this, a, b, c); switch (a) { case "ToolbarTemplate": case "RangeSelectorTemplate": this.ai2 = new FinancialChartToolbar(this, this.anj); break; case "Toolbar": var d = b; if (d != null) { d.chartTypeChanged = delegateRemove(d.chartTypeChanged, runOn(this, this.aqd)); d.trendLineTypeChanged = delegateRemove(d.trendLineTypeChanged, runOn(this, this.aqg)); d.volumeTypeChanged = delegateRemove(d.volumeTypeChanged, runOn(this, this.aqh)); d.l(null); } if (this.ai2 != null) { this.ai2.ac = this.ai9; this.ai2.ai = this.ec; this.ai2.y = this.ai4; this.ai2.al = this.ak2; if (this.amq != null) { this.ai2.l(this.amq); } var e = this.ai2; e.chartTypeChanged = delegateCombine(e.chartTypeChanged, runOn(this, this.aqd)); ; var f = this.ai2; f.trendLineTypeChanged = delegateCombine(f.trendLineTypeChanged, runOn(this, this.aqg)); var g = this.ai2; g.volumeTypeChanged = delegateCombine(g.volumeTypeChanged, runOn(this, this.aqh)); } break; case "ChartType": if (this.ai2 != null) { this.ai2.y = this.ai4; } break; case "VolumeType": if (this.ai2 != null) { this.ai2.ac = this.ai9; } break; case "TrendLineType": if (this.ai2 != null) { this.ai2.ai = this.ec; } break; case "IsToolbarVisible": if (this.ai2 == null) { break; } this.ai2.al = this.ak2; this.setGridRows(); break; } }; FinancialChart.prototype.aqh = function (a, b) { this.ai9 = this.ai2.ac; }; FinancialChart.prototype.aqg = function (a, b) { this.ec = this.ai2.ai; }; FinancialChart.prototype.aqd = function (a, b) { this.ai4 = this.ai2.y; }; FinancialChart.prototype.aqq = function () { this.ajv = new IndicatorPane(); this.ajm = TypeRegistrar.create("FinancialLegend"); }; FinancialChart.prototype.provideGrid = function (a) { this.amt = a; this.arb(); this.setGridRows(); if (this.ai2 != null) { this.ai2.bg(a); } }; FinancialChart.prototype.onDocumentClick = function (a) { if (this.ai2 != null) { this.ai2.bl(a); } }; FinancialChart.prototype.getContext = function () { var a = this.ai2.v(); var b = new FinancialChartContext(); b.vm = new FinancialChartViewModel(); b.vm.toolbar = a; b.container = this.l8; b.toolbarContainer = this.amq; b.legendContainer = this.amp; b.indicatorsContainer = this.amo; b.volumeContainer = this.amr; b.zoomContainer = this.ams; 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.ai2 == null) { this.ai2 = new FinancialChartToolbar(this, this.anj); } this.ai2.w.isIndicatorMenuVisible = this.akt && this.aku; this.amq = b.getSubRenderer(d); this.ai2.l(this.amq); 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.amp = b.getSubRenderer(f); var g = b.createElement("div"); g.setStyleProperty("width", "100%"); g.setStyleProperty("height", "100%"); this.amo = b.getSubRenderer(g); var h = b.createElement("div"); h.setStyleProperty("width", "100%"); h.setStyleProperty("height", "100%"); this.amr = b.getSubRenderer(h); var i = b.createElement("div"); i.setStyleProperty("width", "100%"); i.setStyleProperty("height", "100%"); this.ams = b.getSubRenderer(i); a = b.getSubRenderer(e); } else { this.amq = null; if (this.ai2 != null) { this.ai2.l(null); } if (this.akk != null) { this.akk.provideContainer(null); this.akk = null; } if (this.ajm != null) { this.ajm.provideContainer(null); } } _super.prototype.provideContainer.call(this, a); if (b != null) { if (this.volumeChart != null) { this.volumeChart.dc.b4(this.amr); } if (this.ajv != null) { this.ajv.h(this.amo); } if (this.zoomSliderChart != null) { this.zoomSliderChart.dc.b4(this.ams); if (a != null) { this.apx(); } else { this.akk = null; } } if (this.ajm != null) { this.ajm.provideContainer(this.amp); } this.setGridRows(); } }; FinancialChart.prototype.aq1 = function (a, b, c) { if (a != null) { a.provideContainer(null); } if (b != null) { b.dc.b4(c); } this.setGridRows(); }; FinancialChart.prototype.arf = function (a, b) { this.aq1(a, b, this.ams); if (b == null) { return; } this.apx(); }; FinancialChart.prototype.apx = function () { var _this = this; if (this.ams == null) { return; } if (this.akk != null) { this.akk.provideContainer(null); } this.akk = TypeRegistrar.create("ZoomSlider"); this.akk.provideContainer(this.ams); var a = this.akk; a.windowRectChanged = delegateCombine(a.windowRectChanged, function (a, b) { if (_this.dataChart != null) { _this.dataChart.xc = new Rect(0, _this.akk.windowRect.left, _this.dataChart.wt.top, _this.akk.windowRect.width, _this.dataChart.wt.height); } }); this.apy(); }; FinancialChart.prototype.ard = function (a, b) { this.aq1(a, b, this.amr); }; FinancialChart.prototype.setGridRows = function () { if (this.amt == null) { return; } var a = new Array(6); a[0] = (this.ak2 ? this.ama : 0) + "px"; a[1] = this.aky ? "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.akk != null) { if (a[5] == "0px") { this.akk.hide(); } else { this.akk.show(); } } this.amt.setStyleProperty("-ms-grid-rows", stringReplace(stringJoin.apply(void 0, __spreadArray([" "], __read(a), false)), "auto", "1fr")); this.amt.setStyleProperty("grid-template-rows", stringJoin.apply(void 0, __spreadArray([" "], __read(a), false))); if (this.l8 == null) { return; } if (this.dataChart != null) { this.dataChart.notifyContainerResized(); } if (this.ajv != null) { this.ajv.f(); } if (this.volumeChart != null) { this.volumeChart.notifyContainerResized(); } if (this.zoomSliderChart != null) { this.zoomSliderChart.notifyContainerResized(); } if (this.akk != null) { this.akk.notifySizeChanged(); } }; FinancialChart.prototype.vs = function () { var e_1, _a; _super.prototype.vs.call(this); this.aa5 = 1; this.agw = 0; this.ada = 0; this.ahq = null; this.ahj = AxisDefaults.axis_LineBrush; this.acs = AxisDefaults.axis_TickStroke; this.acr = AxisDefaults.categoryAxis_TickLength; this.ahk = AxisDefaults.axis_TickBrush; this.ahg = null; this.arh = AxisDefaults.axis_MajorBrush; this.amn = AxisDefaults.axis_MajorStroke; this.finalValueAnnotationsVisible = true; this.crosshairsAnnotationEnabled = true; this.gu = false; this.crosshairsDisplayMode = 0; this.ju = Defaults.crosshairLineThickness; this.y4 = Defaults.crosshairLineBrush; this.yz = Defaults.crosshairXAxisAnnotationBackground; this.y0 = Defaults.crosshairXAxisAnnotationTextColor; this.ke = NaN; this.j6 = 40; this.ha = true; this.hi = false; if (this.dataChart != null) { var a = this.dataChart.dc.j.e(); this.aid = a.d; this.aie = a.e; this.aic = a.d; this.arh = this.dataChart.abh; } 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.p(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.aif = c; this.aig = b; }; FinancialChart.prototype.aqx = function () { if (this.ajv != null) { this.ajv.b = null; this.ajv.b = this.indicatorCharts; } this.setGridRows(); }; FinancialChart.prototype.aqy = function () { this.setGridRows(); }; FinancialChart.prototype.aq7 = function () { this.aqx(); }; FinancialChart.prototype.apw = function () { if (this.akk == null || this.zoomSliderChart == null || this.dataChart == null || this.dataChart.series.count == 0) { return; } var a = this.l8.rootWrapper.width(); var b = this.dataChart.xb.left + this.dataChart.xb.width; var c = this.dataChart.xb.left; var d = a - b; this.akk.startInset = c - this.akk.trackStartInset; this.akk.endInset = d - this.akk.trackEndInset; if (this.akk.endInset < 0) { var e = this.akk.endInset; this.akk.endInset = 0; this.dataChart.ih += (e * -1); } if (this.akk.startInset < 0) { var f = this.akk.startInset; this.akk.startInset = 0; this.dataChart.ib += (f * -1); } this.zoomSliderChart.ib = c; this.zoomSliderChart.ih = d; this.zoomSliderChart.hw = this.akk.barExtent; }; FinancialChart.prototype.aqn = function () { this.apw(); }; FinancialChart.prototype.vp = function (a) { _super.prototype.vp.call(this, a); if (a != null) { a.hv = 0; } }; FinancialChart.prototype.ari = function (a) { return a.wm(); }; FinancialChart.prototype.arl = function () { return this.amp == null ? null : this.ark(this.amp.rootWrapper); }; FinancialChart.prototype.arj = function (a) { if (a == null || a.d == null) { return null; } return this.ark(a.d.rootWrapper); }; FinancialChart.prototype.ark = 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.al5 = function () { if (this.amt == null) { return NaN; } var a = this.amt.getOffset(); return this.amt.width() + (a == null ? 0 : a.left); }; FinancialChart.prototype.v1 = function (source_, a, b) { _super.prototype.v1.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.ow(source_, a, b); } }; FinancialChart.prototype.v2 = function (source_, a, b) { _super.prototype.v2.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.ox(source_, a, b); } }; FinancialChart.prototype.v0 = function (source_) { _super.prototype.v0.call(this, source_); if (this.zoomSliderChart != null) { this.zoomSliderChart.op(source_); } }; FinancialChart.prototype.v4 = function (source_, a, b, c) { _super.prototype.v4.call(this, source_, a, b, c); if (this.zoomSliderChart != null) { this.zoomSliderChart.oy(source_, a, b, c); } }; FinancialChart.prototype.vv = function (a, b) { _super.prototype.vv.call(this, a, b); if (this.akz(a)) { a.toolTip = null; } }; Object.defineProperty(FinancialChart.prototype, "ai2", { get: function () { return this.ai1; }, set: function (a) { var b = this.ai2; if (a != b) { this.ai1 = a; this.wj("Toolbar", b, this.ai2); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ani", { get: function () { return this.anb; }, set: function (a) { var b = this.ani; if (a != b) { this.anb = a; this.wj("RangeSelectorTemplate", b, this.ani); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "anj", { get: function () { return this.anc; }, set: function (a) { var b = this.anj; if (a != b) { this.anc = a; this.wj("ToolbarTemplate", b, this.anj); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "anf", { get: function () { return this.am8; }, set: function (a) { var b = this.anf; if (a != b) { this.am8 = a; this.wj("ChartTypePickerTemplate", b, this.anf); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ank", { get: function () { return this.and; }, set: function (a) { var b = this.ank; if (a != b) { this.and = a; this.wj("TrendLineTypePickerTemplate", b, this.ank); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "anl", { get: function () { return this.ane; }, set: function (a) { var b = this.anl; if (a != b) { this.ane = a; this.wj("VolumeTypePickerTemplate", b, this.anl); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ang", { get: function () { return this.am9; }, set: function (a) { var b = this.ang; if (a != b) { this.am9 = a; this.wj("IndicatorMenuTemplate", b, this.ang); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "anh", { get: function () { return this.ana; }, set: function (a) { var b = this.anh; if (a != b) { this.ana = a; this.wj("OverlayPickerTemplate", b, this.anh); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "akk", { get: function () { return this.akj; }, set: function (a) { var b = this.akk; if (a != b) { this.akj = a; this.wj("ZoomSlider", b, this.akk); } }, enumerable: false, configurable: true }); FinancialChart.prototype.get_j6 = function () { return _super.prototype.get_j6.call(this); }; FinancialChart.prototype.set_j6 = function (a) { _super.prototype.set_j6.call(this, a); }; FinancialChart.prototype.get_ha = function () { return _super.prototype.get_ha.call(this); }; FinancialChart.prototype.set_ha = function (a) { _super.prototype.set_ha.call(this, a); }; Object.defineProperty(FinancialChart.prototype, "ama", { get: function () { return this.alt; }, set: function (a) { var b = this.ama; if (a != b) { this.alt = a; this.wj("ToolbarHeight", b, this.ama); } }, enumerable: false, configurable: true }); FinancialChart.prototype.aau = function () { return this.xAxis; }; FinancialChart.prototype.aav = function () { return this.yAxis; }; FinancialChart.prototype.onAttachedToUI = function () { _super.prototype.onAttachedToUI.call(this); if (this.akk != null) { this.akk.onAttachedToUI(); } }; FinancialChart.prototype.onDetachedFromUI = function () { _super.prototype.onDetachedFromUI.call(this); if (this.akk != null) { this.akk.onDetachedFromUI(); } }; FinancialChart.prototype.be = function (a) { return 20; }; FinancialChart.prototype.get_h6 = function () { return ((function () { var $ret = new List$1(DataSeriesType_$type, 0); $ret.add(20); return $ret; })()); }; Object.defineProperty(FinancialChart.prototype, "h6", { get: function () { return this.get_h6(); }, enumerable: false, configurable: true }); FinancialChart.prototype.get_h5 = 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, "h5", { get: function () { return this.get_h5(); }, enumerable: false, configurable: true }); FinancialChart.prototype.aio = function (a) { return this.aip(a); }; FinancialChart.prototype.aj2 = function (a) { return this.aj3(a); }; FinancialChart.prototype.ain = function (a) { var b = this.aio(0); b.name = a; return b; }; FinancialChart.prototype.u3 = function () { this.xAxis = this.ain("xAxis"); this.yAxis = this.aj2(0); this.yAxis.name = "yAxis"; this.volumeAxis = this.aj2(0); this.volumeAxis.name = "volumeAxis"; this.volumeXAxis = this.ain("volumeXAxis"); this.alg = new List$1(NumericYAxis.$, 0); this.ali = new List$1(CategoryAxisBase.$, 0); this.indicatorAxis = this.aj2(0); this.indicatorAxis.name = "indicatorAxis"; this.indicatorXAxis = this.ain("indicatorXAxis_0"); this.alg.add(this.indicatorAxis); this.ali.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.aj2(0); this.zoomSliderAxis.name = "zoomSliderAxis"; this.zoomSliderXAxis = this.ain("zoomSliderXAxis"); if (this.zoomSliderAxis.az == null) { this.zoomSliderAxis.az = new AxisLabelSettings(); } if (this.zoomSliderXAxis.az == null) { this.zoomSliderXAxis.az = new AxisLabelSettings(); } }; FinancialChart.prototype.ux = function (a, b) { var c = typeCast(MarkerSeries.$, a); if (c != null) { c.xf = this.c2(a, b); } }; FinancialChart.prototype.c1 = function (a) { if (a != null) { return 1; } return _super.prototype.c1.call(this, a); }; FinancialChart.prototype.xe = function (a) { if (a.suggestedSecondaryAxis == 2) { this.yAxis.lo = true; this.yAxis.mm = 10; } }; FinancialChart.prototype.xh = function () { this.yAxis.lo = this.ak9; this.yAxis.mm = this.am7; }; FinancialChart.prototype.ai6 = function (a) { var b; if (this.ai4 == 0) { if (a == null || a.index > 0 || stringIsNullOrEmpty(a.getMemberPathFor(12))) { b = 4; } else { b = 2; } } else { b = this.ai4; } b = this.ai5(b); return b; }; FinancialChart.prototype.ai5 = 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.ajf = 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.ai8 = 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.anu = function (a) { var b = a.getMemberPathFor(14); if (stringIsNullOrEmpty(b)) { b = a.getMemberPathFor(11); } return b; }; FinancialChart.prototype.aip = 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.aj3 = 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.aj9 = function () { return this.df(1); }; FinancialChart.prototype.aka = function () { return this.df(0); }; FinancialChart.prototype.aj8 = function () { return this.df(2); }; FinancialChart.prototype.akb = function () { return this.df(20); }; Object.defineProperty(FinancialChart.prototype, "aks", { get: function () { return (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ajq", { 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, "akv", { get: function () { return (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ajo", { 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, "akt", { get: function () { return (TypeRegistrar.isRegistered("IndicatorProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ajs", { 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, "aku", { get: function () { return (TypeRegistrar.isRegistered("OverlayProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ajx", { 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.anu(a); switch (this.ai6(a)) { case 3: var d = this.aj9(); this.ajq.setValueMemberPath(d, c); this.ajq.setXAxis(d, this.xAxis); this.ajq.setYAxis(d, this.yAxis); this.ajq.setCategoryMode(d, 1); return d; case 4: var e = this.aka(); this.ajq.setValueMemberPath(e, c); this.ajq.setXAxis(e, this.xAxis); this.ajq.setYAxis(e, this.yAxis); this.ajq.setCategoryMode(e, 1); return e; default: case 1: case 2: var f = this.akb(); this.ajo.setOpenMemberPath(f, a.getMemberPathFor(11)); this.ajo.setHighMemberPath(f, a.getMemberPathFor(12)); this.ajo.setLowMemberPath(f, a.getMemberPathFor(13)); this.ajo.setCloseMemberPath(f, a.getMemberPathFor(14)); this.ajo.setVolumeMemberPath(f, a.getMemberPathFor(15)); this.ajo.setXAxis(f, this.xAxis); this.ajo.setYAxis(f, this.yAxis); this.ajo.setDisplayType(f, this.ai4 == 1 ? 1 : 0); this.ajo.setCategoryMode(f, 1); return f; } }; FinancialChart.prototype.xg = function () { _super.prototype.xg.call(this); this.aql(this.xAxis); this.aq9(false); if (this.ai9 != 0 && this.volumeChart != null) { this.aqs(); } this.aql(this.volumeXAxis); this.aql(this.indicatorXAxis); this.aq6(); this.aq8(); if (this.ajg != 0) { this.aqt(); this.aql(this.zoomSliderXAxis); } }; FinancialChart.prototype.agi = function (a, b) { var e_2, _a; _super.prototype.agi.call(this, a, b); a(this.volumeXAxis); if (this.ali != null) { try { for (var _b = __values(fromEnum(this.ali)), _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.agn = function (a, b) { var e_3, _a; _super.prototype.agn.call(this, a, b); if (b) { a(this.volumeAxis); if (this.alg != null) { try { for (var _b = __values(fromEnum(this.alg)), _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.aqp = function (a) { var b = typeCast(IZoomableCategoryAxis_$type, this.xAxis); if (b != null) { a(b); } }; FinancialChart.prototype.agl = function (a) { _super.prototype.agl.call(this, a); this.agc(this.volumeXAxis, a); this.agc(this.indicatorXAxis, a); this.agc(this.zoomSliderXAxis, a); }; FinancialChart.prototype.agq = function (a) { _super.prototype.agq.call(this, a); this.agc(this.volumeAxis, a); this.agc(this.indicatorAxis, a); this.agc(this.zoomSliderAxis, a); }; FinancialChart.prototype.ago = function (a) { _super.prototype.ago.call(this, a); this.agb(this.volumeAxis, a); this.agb(this.indicatorAxis, a); this.agb(this.zoomSliderAxis, a); }; FinancialChart.prototype.agj = function (a) { _super.prototype.agj.call(this, a); this.agb(this.volumeXAxis, a); this.agb(this.indicatorXAxis, a); this.agb(this.zoomSliderXAxis, a); }; FinancialChart.prototype.vo = function (a) { var _this = this; _super.prototype.vo.call(this, a); if (a == null) { return; } if (a == this.zoomSliderChart) { a.x7 = a.ya = 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.aop(); $ret.synchronizeHorizontally = true; $ret.synchronizeVertically = false; return $ret; })())); SyncManager.c(a); } a.cz = 2; }; FinancialChart.prototype.aop = function () { if (this.anm == null) { FinancialChart.am6++; this.anm = FinancialChart.am6.toString(); } return this.anm; }; FinancialChart.prototype.ap7 = function (a, b) { this.apt(); this.aqn(); }; FinancialChart.prototype.apt = function () { var e_4, _a; if (this.yAxis.b8()) { return; } var a = this.yAxis.aw.bg; if (this.ai9 != 0) { a = Math.max(a, this.volumeAxis.aw.bg); } try { for (var _b = __values(fromEnum(this.alg)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; a = Math.max(a, b.aw.bg); } } 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.apu(a); }; FinancialChart.prototype.apu = 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.alg)), _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.apz = 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.akx(e))) { continue; } a(c.series._inner[d], b); } } }; FinancialChart.prototype.ap2 = 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.eu) { continue; } a(this.volumeChart.series._inner[b], b); } }; FinancialChart.prototype.ap0 = 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.akz(c)) { continue; } a(c, b); } }; FinancialChart.prototype.ap1 = 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.akz(d)) { continue; } var e = this.am0(d, c); a(d, e); } if (b) { this.ap3(a); } }; FinancialChart.prototype.ap3 = 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.eu) { continue; } a(this.zoomSliderChart.series._inner[b], b); } }; FinancialChart.prototype.am0 = 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.ajk == null ? 0 : this.ajk.count; return b - (c * d); }; FinancialChart.prototype.vd = function (a) { _super.prototype.vd.call(this, a); this.ap2(a); this.apz(a); this.ap3(a); }; Object.defineProperty(FinancialChart.prototype, "volumeChart", { get: function () { return this.akf; }, set: function (a) { var b = this.volumeChart; if (a != b) { this.akf = a; this.wj("VolumeChart", b, this.volumeChart); } }, enumerable: false, configurable: true }); FinancialChart.prototype.aqs = 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.akz(d) || d.eu) { continue; } b++; var e = void 0;