UNPKG

igniteui-react-charts

Version:

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

1,482 lines (1,481 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.akk = null; _this.ani = null; _this.ang = null; _this.and = null; _this.anf = null; _this.anh = null; _this.ane = null; _this.ajq = null; _this.an0 = null; _this.an1 = null; _this.anx = null; _this.an2 = null; _this.an3 = null; _this.any = null; _this.anz = null; _this.ak8 = null; _this.ami = 40; _this.ake = null; _this.akc = null; _this.akg = null; _this.akl = null; _this.aob = null; _this.ak4 = null; _this.alu = false; _this.alt = false; _this.al1 = false; _this.alg = false; _this.ano = 10; _this.amp = NaN; _this.amr = NaN; _this.amq = NaN; _this.ams = 0; _this.ajw = 0; _this.ajz = 0; _this.amk = 3; _this.amn = NaN; _this.aml = NaN; _this.amm = NaN; _this.amo = NaN; _this.aj1 = 0; _this.alb = true; _this.ajs = 0; _this.alc = false; _this.aj6 = null; _this.aj8 = null; _this.al3 = null; _this.ale = true; _this.ald = false; _this.alf = false; _this.ak5 = null; _this.aj3 = 1; _this.aiu = null; _this.aiv = null; _this.aiw = null; _this.aix = null; _this.aiz = null; _this.aiy = null; _this.ait = null; _this.ais = null; _this.amj = 1; _this.amh = 1; _this.amg = 2; _this.amf = 1; _this.aki = null; _this.ank = -2147483648; _this.ame = 2; _this.ann = 3; _this.anl = 10; _this.anj = 30; _this.anm = 9; _this.ajn = null; _this.ajo = null; _this.ajj = null; _this.applyCustomIndicators = null; _this.ar5 = null; _this.amt = 1; _this.ala = false; _this.aka = null; _this.amb = dateMinValue(); _this.ama = dateMaxValue(); _this.al8 = null; _this.vn(); _this.al8 = new ObservableCollection$1(Base.$, 0); if (_this.xAxisBreaks != null) { var a = _this.xAxisBreaks; a.collectionChanged = delegateCombine(a.collectionChanged, function (a, b) { return _this.aru(); }); } _this.arf(); return _this; } FinancialChart.prototype.w6 = function (a, b, c) { _super.prototype.w6.call(this, a, b, c); switch (a) { case "ToolbarTemplate": case "RangeSelectorTemplate": this.ajr = new FinancialChartToolbar(this, this.an8); break; case "Toolbar": var d = b; if (d != null) { d.chartTypeChanged = delegateRemove(d.chartTypeChanged, runOn(this, this.aq2)); d.trendLineTypeChanged = delegateRemove(d.trendLineTypeChanged, runOn(this, this.aq5)); d.volumeTypeChanged = delegateRemove(d.volumeTypeChanged, runOn(this, this.aq6)); d.l(null); } if (this.ajr != null) { this.ajr.ac = this.ajy; this.ajr.ai = this.ee; this.ajr.y = this.ajt; this.ajr.al = this.alr; if (this.anf != null) { this.ajr.l(this.anf); } var e = this.ajr; e.chartTypeChanged = delegateCombine(e.chartTypeChanged, runOn(this, this.aq2)); ; var f = this.ajr; f.trendLineTypeChanged = delegateCombine(f.trendLineTypeChanged, runOn(this, this.aq5)); var g = this.ajr; g.volumeTypeChanged = delegateCombine(g.volumeTypeChanged, runOn(this, this.aq6)); } break; case "ChartType": if (this.ajr != null) { this.ajr.y = this.ajt; } break; case "VolumeType": if (this.ajr != null) { this.ajr.ac = this.ajy; } break; case "TrendLineType": if (this.ajr != null) { this.ajr.ai = this.ee; } break; case "IsToolbarVisible": if (this.ajr == null) { break; } this.ajr.al = this.alr; this.setGridRows(); break; } }; FinancialChart.prototype.aq6 = function (a, b) { this.ajy = this.ajr.ac; }; FinancialChart.prototype.aq5 = function (a, b) { this.ee = this.ajr.ai; }; FinancialChart.prototype.aq2 = function (a, b) { this.ajt = this.ajr.y; }; FinancialChart.prototype.arf = function () { this.akk = new IndicatorPane(); this.akb = TypeRegistrar.create("FinancialLegend"); }; FinancialChart.prototype.provideGrid = function (a) { this.ani = a; this.ar0(); this.setGridRows(); if (this.ajr != null) { this.ajr.bg(a); } }; FinancialChart.prototype.onDocumentClick = function (a) { if (this.ajr != null) { this.ajr.bl(a); } }; FinancialChart.prototype.getContext = function () { var a = this.ajr.v(); var b = new FinancialChartContext(); b.vm = new FinancialChartViewModel(); b.vm.toolbar = a; b.container = this.mi; b.toolbarContainer = this.anf; b.legendContainer = this.ane; b.indicatorsContainer = this.and; b.volumeContainer = this.ang; b.zoomContainer = this.anh; 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.ajr == null) { this.ajr = new FinancialChartToolbar(this, this.an8); } this.ajr.w.isIndicatorMenuVisible = this.ali && this.alj; this.anf = b.getSubRenderer(d); this.ajr.l(this.anf); 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.ane = b.getSubRenderer(f); var g = b.createElement("div"); g.setStyleProperty("width", "100%"); g.setStyleProperty("height", "100%"); this.and = b.getSubRenderer(g); var h = b.createElement("div"); h.setStyleProperty("width", "100%"); h.setStyleProperty("height", "100%"); this.ang = b.getSubRenderer(h); var i = b.createElement("div"); i.setStyleProperty("width", "100%"); i.setStyleProperty("height", "100%"); this.anh = b.getSubRenderer(i); a = b.getSubRenderer(e); } else { this.anf = null; if (this.ajr != null) { this.ajr.l(null); } if (this.ak9 != null) { this.ak9.provideContainer(null); this.ak9 = null; } if (this.akb != null) { this.akb.provideContainer(null); } } _super.prototype.provideContainer.call(this, a); if (b != null) { if (this.volumeChart != null) { this.volumeChart.dw.b7(this.ang); } if (this.akk != null) { this.akk.h(this.and); } if (this.zoomSliderChart != null) { this.zoomSliderChart.dw.b7(this.anh); if (a != null) { this.aqm(); } else { this.ak9 = null; } } if (this.akb != null) { this.akb.provideContainer(this.ane); } this.setGridRows(); } }; FinancialChart.prototype.arq = function (a, b, c) { if (a != null) { a.provideContainer(null); } if (b != null) { b.dw.b7(c); } this.setGridRows(); }; FinancialChart.prototype.ar4 = function (a, b) { this.arq(a, b, this.anh); if (b == null) { return; } this.aqm(); }; FinancialChart.prototype.aqm = function () { var _this = this; if (this.anh == null) { return; } if (this.ak9 != null) { this.ak9.provideContainer(null); } this.ak9 = TypeRegistrar.create("ZoomSlider"); this.ak9.provideContainer(this.anh); var a = this.ak9; a.windowRectChanged = delegateCombine(a.windowRectChanged, function (a, b) { if (_this.dataChart != null) { _this.dataChart.za = new Rect(0, _this.ak9.windowRect.left, _this.dataChart.yr.top, _this.ak9.windowRect.width, _this.dataChart.yr.height); } }); this.aqn(); }; FinancialChart.prototype.ar2 = function (a, b) { this.arq(a, b, this.ang); }; FinancialChart.prototype.setGridRows = function () { if (this.ani == null) { return; } var a = new Array(6); a[0] = (this.alr ? this.amz : 0) + "px"; a[1] = this.aln ? "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.ak9 != null) { if (a[5] == "0px") { this.ak9.hide(); } else { this.ak9.show(); } } this.ani.setStyleProperty("-ms-grid-rows", stringReplace(stringJoin.apply(void 0, __spreadArray([" "], __read(a), false)), "auto", "1fr")); this.ani.setStyleProperty("grid-template-rows", stringJoin.apply(void 0, __spreadArray([" "], __read(a), false))); if (this.mi == null) { return; } if (this.dataChart != null) { this.dataChart.notifyContainerResized(); } if (this.akk != null) { this.akk.f(); } if (this.volumeChart != null) { this.volumeChart.notifyContainerResized(); } if (this.zoomSliderChart != null) { this.zoomSliderChart.notifyContainerResized(); } if (this.ak9 != null) { this.ak9.notifySizeChanged(); } }; FinancialChart.prototype.v9 = function () { var e_1, _a; _super.prototype.v9.call(this); this.abu = 1; this.ahl = 0; this.adz = 0; this.aif = null; this.ah8 = AxisDefaults.axis_LineBrush; this.adh = AxisDefaults.axis_TickStroke; this.adg = AxisDefaults.categoryAxis_TickLength; this.ah9 = AxisDefaults.axis_TickBrush; this.ah5 = null; this.ar6 = AxisDefaults.axis_MajorBrush; this.anc = AxisDefaults.axis_MajorStroke; this.finalValueAnnotationsVisible = true; this.crosshairsAnnotationEnabled = true; this.g0 = false; this.crosshairsDisplayMode = 0; this.j3 = Defaults.crosshairLineThickness; this.zt = Defaults.crosshairLineBrush; this.zo = Defaults.crosshairXAxisAnnotationBackground; this.zp = Defaults.crosshairXAxisAnnotationTextColor; this.ko = NaN; this.kg = 40; this.hg = true; this.hp = false; if (this.dataChart != null) { var a = this.dataChart.dw.j.e(); this.ai2 = a.d; this.ai3 = a.e; this.ai1 = a.d; this.ar6 = this.dataChart.adt; } 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.ai4 = c; this.ai5 = b; }; FinancialChart.prototype.arm = function () { if (this.akk != null) { this.akk.b = null; this.akk.b = this.indicatorCharts; } this.setGridRows(); }; FinancialChart.prototype.arn = function () { this.setGridRows(); }; FinancialChart.prototype.arw = function () { this.arm(); }; FinancialChart.prototype.aql = function () { if (this.ak9 == null || this.zoomSliderChart == null || this.dataChart == null || this.dataChart.series.count == 0) { return; } var a = this.mi.rootWrapper.width(); var b = this.dataChart.y9.left + this.dataChart.y9.width; var c = this.dataChart.y9.left; var d = a - b; this.ak9.startInset = c - this.ak9.trackStartInset; this.ak9.endInset = d - this.ak9.trackEndInset; if (this.ak9.endInset < 0) { var e = this.ak9.endInset; this.ak9.endInset = 0; this.dataChart.jc += (e * -1); } if (this.ak9.startInset < 0) { var f = this.ak9.startInset; this.ak9.startInset = 0; this.dataChart.i7 += (f * -1); } this.zoomSliderChart.i7 = c; this.zoomSliderChart.jc = d; this.zoomSliderChart.ir = this.ak9.barExtent; }; FinancialChart.prototype.arc = function () { this.aql(); }; FinancialChart.prototype.v6 = function (a) { _super.prototype.v6.call(this, a); if (a != null) { a.iq = 0; } }; FinancialChart.prototype.ar7 = function (a) { return a.yk(); }; FinancialChart.prototype.asa = function () { return this.ane == null ? null : this.ar9(this.ane.rootWrapper); }; FinancialChart.prototype.ar8 = function (a) { if (a == null || a.d == null) { return null; } return this.ar9(a.d.rootWrapper); }; FinancialChart.prototype.ar9 = 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.amu = function () { if (this.ani == null) { return NaN; } var a = this.ani.getOffset(); return this.ani.width() + (a == null ? 0 : a.left); }; FinancialChart.prototype.wj = function (source_, a, b) { _super.prototype.wj.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.p3(source_, a, b); } }; FinancialChart.prototype.wk = function (source_, a, b) { _super.prototype.wk.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.p4(source_, a, b); } }; FinancialChart.prototype.wi = function (source_) { _super.prototype.wi.call(this, source_); if (this.zoomSliderChart != null) { this.zoomSliderChart.pw(source_); } }; FinancialChart.prototype.wm = function (source_, a, b, c) { _super.prototype.wm.call(this, source_, a, b, c); if (this.zoomSliderChart != null) { this.zoomSliderChart.p5(source_, a, b, c); } }; FinancialChart.prototype.wc = function (a, b) { _super.prototype.wc.call(this, a, b); if (this.alo(a)) { a.toolTip = null; } }; Object.defineProperty(FinancialChart.prototype, "ajr", { get: function () { return this.ajq; }, set: function (a) { var b = this.ajr; if (a != b) { this.ajq = a; this.w1("Toolbar", b, this.ajr); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "an7", { get: function () { return this.an0; }, set: function (a) { var b = this.an7; if (a != b) { this.an0 = a; this.w1("RangeSelectorTemplate", b, this.an7); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "an8", { get: function () { return this.an1; }, set: function (a) { var b = this.an8; if (a != b) { this.an1 = a; this.w1("ToolbarTemplate", b, this.an8); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "an4", { get: function () { return this.anx; }, set: function (a) { var b = this.an4; if (a != b) { this.anx = a; this.w1("ChartTypePickerTemplate", b, this.an4); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "an9", { get: function () { return this.an2; }, set: function (a) { var b = this.an9; if (a != b) { this.an2 = a; this.w1("TrendLineTypePickerTemplate", b, this.an9); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aoa", { get: function () { return this.an3; }, set: function (a) { var b = this.aoa; if (a != b) { this.an3 = a; this.w1("VolumeTypePickerTemplate", b, this.aoa); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "an5", { get: function () { return this.any; }, set: function (a) { var b = this.an5; if (a != b) { this.any = a; this.w1("IndicatorMenuTemplate", b, this.an5); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "an6", { get: function () { return this.anz; }, set: function (a) { var b = this.an6; if (a != b) { this.anz = a; this.w1("OverlayPickerTemplate", b, this.an6); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ak9", { get: function () { return this.ak8; }, set: function (a) { var b = this.ak9; if (a != b) { this.ak8 = a; this.w1("ZoomSlider", b, this.ak9); } }, enumerable: false, configurable: true }); FinancialChart.prototype.get_kg = function () { return _super.prototype.get_kg.call(this); }; FinancialChart.prototype.set_kg = function (a) { _super.prototype.set_kg.call(this, a); }; FinancialChart.prototype.get_hg = function () { return _super.prototype.get_hg.call(this); }; FinancialChart.prototype.set_hg = function (a) { _super.prototype.set_hg.call(this, a); }; Object.defineProperty(FinancialChart.prototype, "amz", { get: function () { return this.ami; }, set: function (a) { var b = this.amz; if (a != b) { this.ami = a; this.w1("ToolbarHeight", b, this.amz); } }, enumerable: false, configurable: true }); FinancialChart.prototype.abj = function () { return this.xAxis; }; FinancialChart.prototype.abk = function () { return this.yAxis; }; FinancialChart.prototype.onAttachedToUI = function () { _super.prototype.onAttachedToUI.call(this); if (this.ak9 != null) { this.ak9.onAttachedToUI(); } }; FinancialChart.prototype.onDetachedFromUI = function () { _super.prototype.onDetachedFromUI.call(this); if (this.ak9 != null) { this.ak9.onDetachedFromUI(); } }; FinancialChart.prototype.bf = function (a) { return 20; }; FinancialChart.prototype.get_ie = function () { return ((function () { var $ret = new List$1(DataSeriesType_$type, 0); $ret.add(20); return $ret; })()); }; Object.defineProperty(FinancialChart.prototype, "ie", { get: function () { return this.get_ie(); }, enumerable: false, configurable: true }); FinancialChart.prototype.get_id = 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, "id", { get: function () { return this.get_id(); }, enumerable: false, configurable: true }); FinancialChart.prototype.ajd = function (a) { return this.aje(a); }; FinancialChart.prototype.akr = function (a) { return this.aks(a); }; FinancialChart.prototype.ajc = function (a) { var b = this.ajd(0); b.name = a; return b; }; FinancialChart.prototype.vi = function () { this.xAxis = this.ajc("xAxis"); this.yAxis = this.akr(0); this.yAxis.name = "yAxis"; this.volumeAxis = this.akr(0); this.volumeAxis.name = "volumeAxis"; this.volumeXAxis = this.ajc("volumeXAxis"); this.al5 = new List$1(NumericYAxis.$, 0); this.al7 = new List$1(CategoryAxisBase.$, 0); this.indicatorAxis = this.akr(0); this.indicatorAxis.name = "indicatorAxis"; this.indicatorXAxis = this.ajc("indicatorXAxis_0"); this.al5.add(this.indicatorAxis); this.al7.add(this.indicatorXAxis); if (this.xAxis.a4 == null) { this.xAxis.a4 = new AxisLabelSettings(); } if (this.yAxis.a4 == null) { this.yAxis.a4 = new AxisLabelSettings(); } if (this.volumeAxis.a4 == null) { this.volumeAxis.a4 = new AxisLabelSettings(); } if (this.volumeXAxis.a4 == null) { this.volumeAxis.a4 = new AxisLabelSettings(); } if (this.indicatorAxis.a4 == null) { this.indicatorAxis.a4 = new AxisLabelSettings(); } if (this.indicatorXAxis.a4 == null) { this.indicatorXAxis.a4 = new AxisLabelSettings(); } this.zoomSliderAxis = this.akr(0); this.zoomSliderAxis.name = "zoomSliderAxis"; this.zoomSliderXAxis = this.ajc("zoomSliderXAxis"); if (this.zoomSliderAxis.a4 == null) { this.zoomSliderAxis.a4 = new AxisLabelSettings(); } if (this.zoomSliderXAxis.a4 == null) { this.zoomSliderXAxis.a4 = new AxisLabelSettings(); } }; FinancialChart.prototype.vb = function (a, b) { var c = typeCast(MarkerSeries.$, a); if (c != null) { c.xv = this.c4(a, b); } }; FinancialChart.prototype.c3 = function (a) { if (a != null) { return 1; } return _super.prototype.c3.call(this, a); }; FinancialChart.prototype.xz = function (a) { if (a.suggestedSecondaryAxis == 2) { this.yAxis.qg = true; this.yAxis.rj = 10; } }; FinancialChart.prototype.x2 = function () { this.yAxis.qg = this.aly; this.yAxis.rj = this.anw; }; FinancialChart.prototype.ajv = function (a) { var b; if (this.ajt == 0) { if (a == null || a.index > 0 || stringIsNullOrEmpty(a.getMemberPathFor(12))) { b = 4; } else { b = 2; } } else { b = this.ajt; } b = this.aju(b); return b; }; FinancialChart.prototype.aju = 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.aj4 = 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.ajx = 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.aoj = function (a) { var b = a.getMemberPathFor(14); if (stringIsNullOrEmpty(b)) { b = a.getMemberPathFor(11); } return b; }; FinancialChart.prototype.aje = 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.aks = 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.aky = function () { return this.dh(1); }; FinancialChart.prototype.akz = function () { return this.dh(0); }; FinancialChart.prototype.akx = function () { return this.dh(2); }; FinancialChart.prototype.ak0 = function () { return this.dh(20); }; Object.defineProperty(FinancialChart.prototype, "alh", { get: function () { return (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "akf", { 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, "alk", { get: function () { return (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "akd", { 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, "ali", { get: function () { return (TypeRegistrar.isRegistered("IndicatorProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "akh", { 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, "alj", { get: function () { return (TypeRegistrar.isRegistered("OverlayProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "akm", { 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.de = function (a, b) { var c = this.aoj(a); switch (this.ajv(a)) { case 3: var d = this.aky(); this.akf.setValueMemberPath(d, c); this.akf.setXAxis(d, this.xAxis); this.akf.setYAxis(d, this.yAxis); this.akf.setCategoryMode(d, 1); return d; case 4: var e = this.akz(); this.akf.setValueMemberPath(e, c); this.akf.setXAxis(e, this.xAxis); this.akf.setYAxis(e, this.yAxis); this.akf.setCategoryMode(e, 1); return e; default: case 1: case 2: var f = this.ak0(); this.akd.setOpenMemberPath(f, a.getMemberPathFor(11)); this.akd.setHighMemberPath(f, a.getMemberPathFor(12)); this.akd.setLowMemberPath(f, a.getMemberPathFor(13)); this.akd.setCloseMemberPath(f, a.getMemberPathFor(14)); this.akd.setVolumeMemberPath(f, a.getMemberPathFor(15)); this.akd.setXAxis(f, this.xAxis); this.akd.setYAxis(f, this.yAxis); this.akd.setDisplayType(f, this.ajt == 1 ? 1 : 0); this.akd.setCategoryMode(f, 1); return f; } }; FinancialChart.prototype.x1 = function () { _super.prototype.x1.call(this); this.ara(this.xAxis); this.ary(false); if (this.ajy != 0 && this.volumeChart != null) { this.arh(); } this.ara(this.volumeXAxis); this.ara(this.indicatorXAxis); this.arv(); this.arx(); if (this.aj5 != 0) { this.ari(); this.ara(this.zoomSliderXAxis); } }; FinancialChart.prototype.ag7 = function (a, b) { var e_2, _a; _super.prototype.ag7.call(this, a, b); a(this.volumeXAxis); if (this.al7 != null) { try { for (var _b = __values(fromEnum(this.al7)), _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.ahc = function (a, b) { var e_3, _a; _super.prototype.ahc.call(this, a, b); if (b) { a(this.volumeAxis); if (this.al5 != null) { try { for (var _b = __values(fromEnum(this.al5)), _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.are = function (a) { var b = typeCast(IZoomableCategoryAxis_$type, this.xAxis); if (b != null) { a(b); } }; FinancialChart.prototype.aha = function (a) { _super.prototype.aha.call(this, a); this.ag1(this.volumeXAxis, a); this.ag1(this.indicatorXAxis, a); this.ag1(this.zoomSliderXAxis, a); }; FinancialChart.prototype.ahf = function (a) { _super.prototype.ahf.call(this, a); this.ag1(this.volumeAxis, a); this.ag1(this.indicatorAxis, a); this.ag1(this.zoomSliderAxis, a); }; FinancialChart.prototype.ahd = function (a) { _super.prototype.ahd.call(this, a); this.ag0(this.volumeAxis, a); this.ag0(this.indicatorAxis, a); this.ag0(this.zoomSliderAxis, a); }; FinancialChart.prototype.ag8 = function (a) { _super.prototype.ag8.call(this, a); this.ag0(this.volumeXAxis, a); this.ag0(this.indicatorXAxis, a); this.ag0(this.zoomSliderXAxis, a); }; FinancialChart.prototype.v5 = function (a) { var _this = this; _super.prototype.v5.call(this, a); if (a == null) { return; } if (a == this.zoomSliderChart) { a.aae = a.aai = 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.ape(); $ret.synchronizeHorizontally = true; $ret.synchronizeVertically = false; return $ret; })())); SyncManager.c(a); } a.di = 2; }; FinancialChart.prototype.ape = function () { if (this.aob == null) { FinancialChart.anv++; this.aob = FinancialChart.anv.toString(); } return this.aob; }; FinancialChart.prototype.aqw = function (a, b) { this.aqi(); this.arc(); }; FinancialChart.prototype.aqi = function () { var e_4, _a; if (this.yAxis.db()) { return; } var a = this.yAxis.a1.bi; if (this.ajy != 0) { a = Math.max(a, this.volumeAxis.a1.bi); } try { for (var _b = __values(fromEnum(this.al5)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; a = Math.max(a, b.a1.bi); } } 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.aqj(a); }; FinancialChart.prototype.aqj = function (a) { var e_5, _a; if (this.yAxis.db()) { return; } this.yAxis.gf = this.volumeAxis.gf = a; try { for (var _b = __values(fromEnum(this.al5)), _c = _b.next(); !_c.done; _c = _b.next()) { var b = _c.value; b.gf = 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.gf = this.yAxis.gf; }; FinancialChart.prototype.aqo = 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.b9.count; d++) { var e = c.b9._inner[d]; if (!(this.alm(e))) { continue; } a(c.b9._inner[d], b); } } }; FinancialChart.prototype.aqr = function (a) { if (this.volumeChart == null) { return; } for (var b = 0; b < this.volumeChart.b9.count; b++) { var c = this.volumeChart.b9._inner[b]; if (c.ev) { continue; } a(this.volumeChart.b9._inner[b], b); } }; FinancialChart.prototype.aqp = function (a) { if (this.dataChart == null) { return; } for (var b = 0; b < this.dataChart.b9.count; b++) { var c = this.dataChart.b9._inner[b]; if (!this.alo(c)) { continue; } a(c, b); } }; FinancialChart.prototype.aqq = function (a, b) { if (this.dataChart == null) { return; } for (var c = 0; c < this.dataChart.b9.count; c++) { var d = this.dataChart.b9._inner[c]; if (this.alo(d)) { continue; } var e = this.anp(d, c); a(d, e); } if (b) { this.aqs(a); } }; FinancialChart.prototype.aqs = function (a) { if (this.zoomSliderChart == null) { return; } for (var b = 0; b < this.zoomSliderChart.b9.count; b++) { var c = this.zoomSliderChart.b9._inner[b]; if (c.ev) { continue; } a(this.zoomSliderChart.b9._inner[b], b); } }; FinancialChart.prototype.anp = function (a, b) { if (a.da != this.dataChart) { return b; } var c = this.bg == null || this.bg.dataSeries == null ? 0 : this.bg.dataSeries.count; var d = this.aj9 == null ? 0 : this.aj9.count; return b - (c * d); }; FinancialChart.prototype.vu = function (a) { _super.prototype.vu.call(this, a); this.aqr(a); this.aqo(a); this.aqs(a); }; Object.defineProperty(FinancialChart.prototype, "volumeChart", { get: function () { return this.ak4; }, set: function (a) { var b = this.volumeChart; if (a != b) { this.ak4 = a; this.w1("VolumeChart", b, this.volumeChart); } }, enumerable: false, configurable: true }); FinancialChart.prototype.arh = 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.b9.count; c++) { var d = this.dataChart.b9._inner[c]; if (this.alo(d) || d.ev) { continue; } b++; var e = void 0; var f = this.ajy; f = this.ajx(f);