UNPKG

igniteui-webcomponents-charts

Version:

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

1,474 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-webcomponents-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-webcomponents-core"; import { List$1 } from "igniteui-webcomponents-core"; import { DataSeriesType_$type } from "igniteui-webcomponents-core"; import { IDataSeriesAdapterRule_$type } from "igniteui-webcomponents-core"; import { SimpleFinancialPriceSeriesRule } from "igniteui-webcomponents-core"; import { SubCollectionsRule } from "igniteui-webcomponents-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-webcomponents-core"; import { FinancialChartRangeSelectorOptionCollection } from "./FinancialChartRangeSelectorOptionCollection"; import { ObservableCollection$1 } from "igniteui-webcomponents-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-webcomponents-core"; import { Series } from "./Series"; import { Rect } from "igniteui-webcomponents-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-webcomponents-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-webcomponents-core"; import { timeSpanFromDays } from "igniteui-webcomponents-core"; import { dateMaxValue, dateMinValue } from "igniteui-webcomponents-core"; import { isNaN_, isInfinity } from "igniteui-webcomponents-core"; import { FinancialChartTypePicker } from "./FinancialChartTypePicker"; import { FinancialChartIndicatorMenu } from "./FinancialChartIndicatorMenu"; import { TrendLineType_$type } from "igniteui-webcomponents-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.ajd = null; _this.amb = null; _this.al9 = null; _this.al6 = null; _this.al8 = null; _this.ama = null; _this.al7 = null; _this.aij = null; _this.amt = null; _this.amu = null; _this.amq = null; _this.amv = null; _this.amw = null; _this.amr = null; _this.ams = null; _this.aj1 = null; _this.alb = 40; _this.ai7 = null; _this.ai5 = null; _this.ai9 = null; _this.aje = null; _this.am4 = null; _this.ajx = null; _this.akn = false; _this.akm = false; _this.aku = false; _this.aj9 = false; _this.amh = 10; _this.ali = NaN; _this.alk = NaN; _this.alj = NaN; _this.all = 0; _this.aip = 0; _this.ais = 0; _this.ald = 3; _this.alg = NaN; _this.ale = NaN; _this.alf = NaN; _this.alh = NaN; _this.aiu = 0; _this.aj4 = true; _this.ail = 0; _this.aj5 = false; _this.aiz = null; _this.ai1 = null; _this.akw = null; _this.aj7 = true; _this.aj6 = false; _this.aj8 = false; _this.ajy = null; _this.aiw = 1; _this.ahn = null; _this.aho = null; _this.ahp = null; _this.ahq = null; _this.ahs = null; _this.ahr = null; _this.ahm = null; _this.ahl = null; _this.alc = 1; _this.ala = 1; _this.ak9 = 2; _this.ak8 = 1; _this.ajb = null; _this.amd = -2147483648; _this.ak7 = 2; _this.amg = 3; _this.ame = 10; _this.amc = 30; _this.amf = 9; _this.aig = null; _this.aih = null; _this.aic = null; _this.applyCustomIndicators = null; _this.aqy = null; _this.alm = 1; _this.aj3 = false; _this.ai3 = null; _this.ak4 = dateMinValue(); _this.ak3 = dateMaxValue(); _this.ak1 = null; _this.u2(); _this.ak1 = new ObservableCollection$1(Base.$, 0); if (_this.xAxisBreaks != null) { var a = _this.xAxisBreaks; a.collectionChanged = delegateCombine(a.collectionChanged, function (a, b) { return _this.aqn(); }); } _this.ap8(); return _this; } FinancialChart.prototype.wi = function (a, b, c) { _super.prototype.wi.call(this, a, b, c); switch (a) { case "ToolbarTemplate": case "RangeSelectorTemplate": this.aik = new FinancialChartToolbar(this, this.am1); break; case "Toolbar": var d = b; if (d != null) { d.chartTypeChanged = delegateRemove(d.chartTypeChanged, runOn(this, this.apv)); d.trendLineTypeChanged = delegateRemove(d.trendLineTypeChanged, runOn(this, this.apy)); d.volumeTypeChanged = delegateRemove(d.volumeTypeChanged, runOn(this, this.apz)); d.l(null); } if (this.aik != null) { this.aik.ac = this.air; this.aik.ai = this.ec; this.aik.y = this.aim; this.aik.al = this.akk; if (this.al8 != null) { this.aik.l(this.al8); } var e = this.aik; e.chartTypeChanged = delegateCombine(e.chartTypeChanged, runOn(this, this.apv)); ; var f = this.aik; f.trendLineTypeChanged = delegateCombine(f.trendLineTypeChanged, runOn(this, this.apy)); var g = this.aik; g.volumeTypeChanged = delegateCombine(g.volumeTypeChanged, runOn(this, this.apz)); } break; case "ChartType": if (this.aik != null) { this.aik.y = this.aim; } break; case "VolumeType": if (this.aik != null) { this.aik.ac = this.air; } break; case "TrendLineType": if (this.aik != null) { this.aik.ai = this.ec; } break; case "IsToolbarVisible": if (this.aik == null) { break; } this.aik.al = this.akk; this.setGridRows(); break; } }; FinancialChart.prototype.apz = function (a, b) { this.air = this.aik.ac; }; FinancialChart.prototype.apy = function (a, b) { this.ec = this.aik.ai; }; FinancialChart.prototype.apv = function (a, b) { this.aim = this.aik.y; }; FinancialChart.prototype.ap8 = function () { this.ajd = new IndicatorPane(); this.ai4 = TypeRegistrar.create("FinancialLegend"); }; FinancialChart.prototype.provideGrid = function (a) { this.amb = a; this.aqt(); this.setGridRows(); if (this.aik != null) { this.aik.bg(a); } }; FinancialChart.prototype.onDocumentClick = function (a) { if (this.aik != null) { this.aik.bl(a); } }; FinancialChart.prototype.getContext = function () { var a = this.aik.v(); var b = new FinancialChartContext(); b.vm = new FinancialChartViewModel(); b.vm.toolbar = a; b.container = this.l4; b.toolbarContainer = this.al8; b.legendContainer = this.al7; b.indicatorsContainer = this.al6; b.volumeContainer = this.al9; b.zoomContainer = this.ama; 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.aik == null) { this.aik = new FinancialChartToolbar(this, this.am1); } this.aik.w.isIndicatorMenuVisible = this.akb && this.akc; this.al8 = b.getSubRenderer(d); this.aik.l(this.al8); 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.al7 = b.getSubRenderer(f); var g = b.createElement("div"); g.setStyleProperty("width", "100%"); g.setStyleProperty("height", "100%"); this.al6 = b.getSubRenderer(g); var h = b.createElement("div"); h.setStyleProperty("width", "100%"); h.setStyleProperty("height", "100%"); this.al9 = b.getSubRenderer(h); var i = b.createElement("div"); i.setStyleProperty("width", "100%"); i.setStyleProperty("height", "100%"); this.ama = b.getSubRenderer(i); a = b.getSubRenderer(e); } else { this.al8 = null; if (this.aik != null) { this.aik.l(null); } if (this.aj2 != null) { this.aj2.provideContainer(null); this.aj2 = null; } if (this.ai4 != null) { this.ai4.provideContainer(null); } } _super.prototype.provideContainer.call(this, a); if (b != null) { if (this.volumeChart != null) { this.volumeChart.c9.b4(this.al9); } if (this.ajd != null) { this.ajd.h(this.al6); } if (this.zoomSliderChart != null) { this.zoomSliderChart.c9.b4(this.ama); if (a != null) { this.apf(); } else { this.aj2 = null; } } if (this.ai4 != null) { this.ai4.provideContainer(this.al7); } this.setGridRows(); } }; FinancialChart.prototype.aqj = function (a, b, c) { if (a != null) { a.provideContainer(null); } if (b != null) { b.c9.b4(c); } this.setGridRows(); }; FinancialChart.prototype.aqx = function (a, b) { this.aqj(a, b, this.ama); if (b == null) { return; } this.apf(); }; FinancialChart.prototype.apf = function () { var _this = this; if (this.ama == null) { return; } if (this.aj2 != null) { this.aj2.provideContainer(null); } this.aj2 = TypeRegistrar.create("ZoomSlider"); this.aj2.provideContainer(this.ama); var a = this.aj2; a.windowRectChanged = delegateCombine(a.windowRectChanged, function (a, b) { if (_this.dataChart != null) { _this.dataChart.w0 = new Rect(0, _this.aj2.windowRect.left, _this.dataChart.wh.top, _this.aj2.windowRect.width, _this.dataChart.wh.height); } }); this.apg(); }; FinancialChart.prototype.aqv = function (a, b) { this.aqj(a, b, this.al9); }; FinancialChart.prototype.setGridRows = function () { if (this.amb == null) { return; } var a = new Array(6); a[0] = (this.akk ? this.als : 0) + "px"; a[1] = this.akg ? "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.aj2 != null) { if (a[5] == "0px") { this.aj2.hide(); } else { this.aj2.show(); } } this.amb.setStyleProperty("-ms-grid-rows", stringReplace(stringJoin.apply(void 0, __spreadArray([" "], __read(a), false)), "auto", "1fr")); this.amb.setStyleProperty("grid-template-rows", stringJoin.apply(void 0, __spreadArray([" "], __read(a), false))); if (this.l4 == null) { return; } if (this.dataChart != null) { this.dataChart.notifyContainerResized(); } if (this.ajd != null) { this.ajd.f(); } if (this.volumeChart != null) { this.volumeChart.notifyContainerResized(); } if (this.zoomSliderChart != null) { this.zoomSliderChart.notifyContainerResized(); } if (this.aj2 != null) { this.aj2.notifySizeChanged(); } }; FinancialChart.prototype.vm = function () { var e_1, _a; _super.prototype.vm.call(this); this.aaz = 1; this.age = 0; this.acw = 0; this.ag8 = null; this.ag1 = AxisDefaults.axis_LineBrush; this.acg = AxisDefaults.axis_TickStroke; this.acf = AxisDefaults.categoryAxis_TickLength; this.ag2 = AxisDefaults.axis_TickBrush; this.agy = null; this.aqz = AxisDefaults.axis_MajorBrush; this.al5 = AxisDefaults.axis_MajorStroke; this.finalValueAnnotationsVisible = true; this.crosshairsAnnotationEnabled = true; this.gq = false; this.crosshairsDisplayMode = 0; this.jq = Defaults.crosshairLineThickness; this.yy = Defaults.crosshairLineBrush; this.yt = Defaults.crosshairXAxisAnnotationBackground; this.yu = Defaults.crosshairXAxisAnnotationTextColor; this.ka = NaN; this.j2 = 40; this.g6 = true; this.he = false; if (this.dataChart != null) { var a = this.dataChart.c9.j.e(); this.ahv = a.d; this.ahw = a.e; this.ahu = a.d; this.aqz = this.dataChart.aa5; } 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.ahx = c; this.ahy = b; }; FinancialChart.prototype.aqf = function () { if (this.ajd != null) { this.ajd.b = null; this.ajd.b = this.indicatorCharts; } this.setGridRows(); }; FinancialChart.prototype.aqg = function () { this.setGridRows(); }; FinancialChart.prototype.aqp = function () { this.aqf(); }; FinancialChart.prototype.ape = function () { if (this.aj2 == null || this.zoomSliderChart == null || this.dataChart == null || this.dataChart.series.count == 0) { return; } var a = this.l4.rootWrapper.width(); var b = this.dataChart.wz.left + this.dataChart.wz.width; var c = this.dataChart.wz.left; var d = a - b; this.aj2.startInset = c - this.aj2.trackStartInset; this.aj2.endInset = d - this.aj2.trackEndInset; if (this.aj2.endInset < 0) { var e = this.aj2.endInset; this.aj2.endInset = 0; this.dataChart.h9 += (e * -1); } if (this.aj2.startInset < 0) { var f = this.aj2.startInset; this.aj2.startInset = 0; this.dataChart.h4 += (f * -1); } this.zoomSliderChart.h4 = c; this.zoomSliderChart.h9 = d; this.zoomSliderChart.hr = this.aj2.barExtent; }; FinancialChart.prototype.ap5 = function () { this.ape(); }; FinancialChart.prototype.vj = function (a) { _super.prototype.vj.call(this, a); if (a != null) { a.hq = 0; } }; FinancialChart.prototype.aq0 = function (a) { return a.wa(); }; FinancialChart.prototype.aq3 = function () { return this.al7 == null ? null : this.aq2(this.al7.rootWrapper); }; FinancialChart.prototype.aq1 = function (a) { if (a == null || a.d == null) { return null; } return this.aq2(a.d.rootWrapper); }; FinancialChart.prototype.aq2 = 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.aln = function () { if (this.amb == null) { return NaN; } var a = this.amb.getOffset(); return this.amb.width() + (a == null ? 0 : a.left); }; FinancialChart.prototype.vv = function (source_, a, b) { _super.prototype.vv.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.on(source_, a, b); } }; FinancialChart.prototype.vw = function (source_, a, b) { _super.prototype.vw.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.oo(source_, a, b); } }; FinancialChart.prototype.vu = function (source_) { _super.prototype.vu.call(this, source_); if (this.zoomSliderChart != null) { this.zoomSliderChart.og(source_); } }; FinancialChart.prototype.vy = function (source_, a, b, c) { _super.prototype.vy.call(this, source_, a, b, c); if (this.zoomSliderChart != null) { this.zoomSliderChart.op(source_, a, b, c); } }; FinancialChart.prototype.vp = function (a, b) { _super.prototype.vp.call(this, a, b); if (this.akh(a)) { a.toolTip = null; } }; Object.defineProperty(FinancialChart.prototype, "aik", { get: function () { return this.aij; }, set: function (a) { var b = this.aik; if (a != b) { this.aij = a; this.wd("Toolbar", b, this.aik); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "am0", { get: function () { return this.amt; }, set: function (a) { var b = this.am0; if (a != b) { this.amt = a; this.wd("RangeSelectorTemplate", b, this.am0); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "am1", { get: function () { return this.amu; }, set: function (a) { var b = this.am1; if (a != b) { this.amu = a; this.wd("ToolbarTemplate", b, this.am1); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amx", { get: function () { return this.amq; }, set: function (a) { var b = this.amx; if (a != b) { this.amq = a; this.wd("ChartTypePickerTemplate", b, this.amx); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "am2", { get: function () { return this.amv; }, set: function (a) { var b = this.am2; if (a != b) { this.amv = a; this.wd("TrendLineTypePickerTemplate", b, this.am2); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "am3", { get: function () { return this.amw; }, set: function (a) { var b = this.am3; if (a != b) { this.amw = a; this.wd("VolumeTypePickerTemplate", b, this.am3); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amy", { get: function () { return this.amr; }, set: function (a) { var b = this.amy; if (a != b) { this.amr = a; this.wd("IndicatorMenuTemplate", b, this.amy); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amz", { get: function () { return this.ams; }, set: function (a) { var b = this.amz; if (a != b) { this.ams = a; this.wd("OverlayPickerTemplate", b, this.amz); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aj2", { get: function () { return this.aj1; }, set: function (a) { var b = this.aj2; if (a != b) { this.aj1 = a; this.wd("ZoomSlider", b, this.aj2); } }, 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, "als", { get: function () { return this.alb; }, set: function (a) { var b = this.als; if (a != b) { this.alb = a; this.wd("ToolbarHeight", b, this.als); } }, enumerable: false, configurable: true }); FinancialChart.prototype.aao = function () { return this.xAxis; }; FinancialChart.prototype.aap = function () { return this.yAxis; }; FinancialChart.prototype.onAttachedToUI = function () { _super.prototype.onAttachedToUI.call(this); if (this.aj2 != null) { this.aj2.onAttachedToUI(); } }; FinancialChart.prototype.onDetachedFromUI = function () { _super.prototype.onDetachedFromUI.call(this); if (this.aj2 != null) { this.aj2.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.ah6 = function (a) { return this.ah7(a); }; FinancialChart.prototype.ajk = function (a) { return this.ajl(a); }; FinancialChart.prototype.ah5 = function (a) { var b = this.ah6(0); b.name = a; return b; }; FinancialChart.prototype.ux = function () { this.xAxis = this.ah5("xAxis"); this.yAxis = this.ajk(0); this.yAxis.name = "yAxis"; this.volumeAxis = this.ajk(0); this.volumeAxis.name = "volumeAxis"; this.volumeXAxis = this.ah5("volumeXAxis"); this.aky = new List$1(NumericYAxis.$, 0); this.ak0 = new List$1(CategoryAxisBase.$, 0); this.indicatorAxis = this.ajk(0); this.indicatorAxis.name = "indicatorAxis"; this.indicatorXAxis = this.ah5("indicatorXAxis_0"); this.aky.add(this.indicatorAxis); this.ak0.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.ajk(0); this.zoomSliderAxis.name = "zoomSliderAxis"; this.zoomSliderXAxis = this.ah5("zoomSliderXAxis"); if (this.zoomSliderAxis.az == null) { this.zoomSliderAxis.az = new AxisLabelSettings(); } if (this.zoomSliderXAxis.az == null) { this.zoomSliderXAxis.az = new AxisLabelSettings(); } }; FinancialChart.prototype.ur = 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.w8 = function (a) { if (a.suggestedSecondaryAxis == 2) { this.yAxis.lo = true; this.yAxis.mm = 10; } }; FinancialChart.prototype.xb = function () { this.yAxis.lo = this.akr; this.yAxis.mm = this.amp; }; FinancialChart.prototype.aio = function (a) { var b; if (this.aim == 0) { if (a == null || a.index > 0 || stringIsNullOrEmpty(a.getMemberPathFor(12))) { b = 4; } else { b = 2; } } else { b = this.aim; } b = this.ain(b); return b; }; FinancialChart.prototype.ain = 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.aix = 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.aiq = 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.anc = function (a) { var b = a.getMemberPathFor(14); if (stringIsNullOrEmpty(b)) { b = a.getMemberPathFor(11); } return b; }; FinancialChart.prototype.ah7 = 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.ajl = 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.ajr = function () { return this.df(1); }; FinancialChart.prototype.ajs = function () { return this.df(0); }; FinancialChart.prototype.ajq = function () { return this.df(2); }; FinancialChart.prototype.ajt = function () { return this.df(20); }; Object.defineProperty(FinancialChart.prototype, "aka", { get: function () { return (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ai8", { 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, "akd", { get: function () { return (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ai6", { 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, "akb", { get: function () { return (TypeRegistrar.isRegistered("IndicatorProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aja", { 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, "akc", { get: function () { return (TypeRegistrar.isRegistered("OverlayProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ajf", { 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.anc(a); switch (this.aio(a)) { case 3: var d = this.ajr(); this.ai8.setValueMemberPath(d, c); this.ai8.setXAxis(d, this.xAxis); this.ai8.setYAxis(d, this.yAxis); this.ai8.setCategoryMode(d, 1); return d; case 4: var e = this.ajs(); this.ai8.setValueMemberPath(e, c); this.ai8.setXAxis(e, this.xAxis); this.ai8.setYAxis(e, this.yAxis); this.ai8.setCategoryMode(e, 1); return e; default: case 1: case 2: var f = this.ajt(); this.ai6.setOpenMemberPath(f, a.getMemberPathFor(11)); this.ai6.setHighMemberPath(f, a.getMemberPathFor(12)); this.ai6.setLowMemberPath(f, a.getMemberPathFor(13)); this.ai6.setCloseMemberPath(f, a.getMemberPathFor(14)); this.ai6.setVolumeMemberPath(f, a.getMemberPathFor(15)); this.ai6.setXAxis(f, this.xAxis); this.ai6.setYAxis(f, this.yAxis); this.ai6.setDisplayType(f, this.aim == 1 ? 1 : 0); this.ai6.setCategoryMode(f, 1); return f; } }; FinancialChart.prototype.xa = function () { _super.prototype.xa.call(this); this.ap3(this.xAxis); this.aqr(false); if (this.air != 0 && this.volumeChart != null) { this.aqa(); } this.ap3(this.volumeXAxis); this.ap3(this.indicatorXAxis); this.aqo(); this.aqq(); if (this.aiy != 0) { this.aqb(); this.ap3(this.zoomSliderXAxis); } }; FinancialChart.prototype.af0 = function (a, b) { var e_2, _a; _super.prototype.af0.call(this, a, b); a(this.volumeXAxis); if (this.ak0 != null) { try { for (var _b = __values(fromEnum(this.ak0)), _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.af5 = function (a, b) { var e_3, _a; _super.prototype.af5.call(this, a, b); if (b) { a(this.volumeAxis); if (this.aky != null) { try { for (var _b = __values(fromEnum(this.aky)), _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.ap7 = function (a) { var b = typeCast(IZoomableCategoryAxis_$type, this.xAxis); if (b != null) { a(b); } }; FinancialChart.prototype.af3 = function (a) { _super.prototype.af3.call(this, a); this.afu(this.volumeXAxis, a); this.afu(this.indicatorXAxis, a); this.afu(this.zoomSliderXAxis, a); }; FinancialChart.prototype.af8 = function (a) { _super.prototype.af8.call(this, a); this.afu(this.volumeAxis, a); this.afu(this.indicatorAxis, a); this.afu(this.zoomSliderAxis, a); }; FinancialChart.prototype.af6 = function (a) { _super.prototype.af6.call(this, a); this.aft(this.volumeAxis, a); this.aft(this.indicatorAxis, a); this.aft(this.zoomSliderAxis, a); }; FinancialChart.prototype.af1 = function (a) { _super.prototype.af1.call(this, a); this.aft(this.volumeXAxis, a); this.aft(this.indicatorXAxis, a); this.aft(this.zoomSliderXAxis, a); }; FinancialChart.prototype.vi = function (a) { var _this = this; _super.prototype.vi.call(this, a); if (a == null) { return; } if (a == this.zoomSliderChart) { a.xv = a.xy = 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.an7(); $ret.synchronizeHorizontally = true; $ret.synchronizeVertically = false; return $ret; })())); SyncManager.c(a); } a.cw = 2; }; FinancialChart.prototype.an7 = function () { if (this.am4 == null) { FinancialChart.amo++; this.am4 = FinancialChart.amo.toString(); } return this.am4; }; FinancialChart.prototype.app = function (a, b) { this.apb(); this.ap5(); }; FinancialChart.prototype.apb = function () { var e_4, _a; if (this.yAxis.b8()) { return; } var a = this.yAxis.aw.bd; if (this.air != 0) { a = Math.max(a, this.volumeAxis.aw.bd); } try { for (var _b = __values(fromEnum(this.aky)), _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.apc(a); }; FinancialChart.prototype.apc = 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.aky)), _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.aph = 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.akf(e))) { continue; } a(c.series._inner[d], b); } } }; FinancialChart.prototype.apk = 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.api = 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.akh(c)) { continue; } a(c, b); } }; FinancialChart.prototype.apj = 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.akh(d)) { continue; } var e = this.ami(d, c); a(d, e); } if (b) { this.apl(a); } }; FinancialChart.prototype.apl = 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.ami = 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.ai2 == null ? 0 : this.ai2.count; return b - (c * d); }; FinancialChart.prototype.u7 = function (a) { _super.prototype.u7.call(this, a); this.apk(a); this.aph(a); this.apl(a); }; Object.defineProperty(FinancialChart.prototype, "volumeChart", { get: function () { return this.ajx; }, set: function (a) { var b = this.volumeChart; if (a != b) { this.ajx = a; this.wd("VolumeChart", b, this.volumeChart); } }, enumerable: false, configurable: true }); FinancialChart.prototype.aqa = 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._i