UNPKG

igniteui-angular-charts

Version:

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

1,438 lines 164 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-angular-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-angular-core"; import { List$1 } from "igniteui-angular-core"; import { DataSeriesType_$type } from "igniteui-angular-core"; import { IDataSeriesAdapterRule_$type } from "igniteui-angular-core"; import { SimpleFinancialPriceSeriesRule } from "igniteui-angular-core"; import { SubCollectionsRule } from "igniteui-angular-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-angular-core"; import { FinancialChartRangeSelectorOptionCollection } from "./FinancialChartRangeSelectorOptionCollection"; import { ObservableCollection$1 } from "igniteui-angular-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-angular-core"; import { Series } from "./Series"; import { Rect } from "igniteui-angular-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-angular-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-angular-core"; import { timeSpanFromDays } from "igniteui-angular-core"; import { dateMaxValue, dateMinValue } from "igniteui-angular-core"; import { isNaN_, isInfinity } from "igniteui-angular-core"; import { FinancialChartTypePicker } from "./FinancialChartTypePicker"; import { FinancialChartIndicatorMenu } from "./FinancialChartIndicatorMenu"; import { TrendLineType_$type } from "igniteui-angular-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.air = null; _this.alp = null; _this.aln = null; _this.alk = null; _this.alm = null; _this.alo = null; _this.all = null; _this.ahx = null; _this.al7 = null; _this.al8 = null; _this.al4 = null; _this.al9 = null; _this.ama = null; _this.al5 = null; _this.al6 = null; _this.ajf = null; _this.akp = 40; _this.ail = null; _this.aij = null; _this.ain = null; _this.ais = null; _this.ami = null; _this.ajb = null; _this.aj1 = false; _this.aj0 = false; _this.aj8 = false; _this.ajn = false; _this.alv = 10; _this.akw = NaN; _this.aky = NaN; _this.akx = NaN; _this.akz = 0; _this.ah3 = 0; _this.ah6 = 0; _this.akr = 3; _this.aku = NaN; _this.aks = NaN; _this.akt = NaN; _this.akv = NaN; _this.ah8 = 0; _this.aji = true; _this.ahz = 0; _this.ajj = false; _this.aid = null; _this.aif = null; _this.aka = null; _this.ajl = true; _this.ajk = false; _this.ajm = false; _this.ajc = null; _this.aia = 1; _this.ag1 = null; _this.ag2 = null; _this.ag3 = null; _this.ag4 = null; _this.ag6 = null; _this.ag5 = null; _this.ag0 = null; _this.agz = null; _this.akq = 1; _this.ako = 1; _this.akn = 2; _this.akm = 1; _this.aip = null; _this.alr = -2147483648; _this.akl = 2; _this.alu = 3; _this.als = 10; _this.alq = 30; _this.alt = 9; _this.ahu = null; _this.ahv = null; _this.ahq = null; _this.applyCustomIndicators = null; _this.aqc = null; _this.ak0 = 1; _this.ajh = false; _this.aih = null; _this.aki = dateMinValue(); _this.akh = dateMaxValue(); _this.akf = null; _this.ul(); _this.akf = new ObservableCollection$1(Base.$, 0); if (_this.xAxisBreaks != null) { var a = _this.xAxisBreaks; a.collectionChanged = delegateCombine(a.collectionChanged, function (a, b) { return _this.ap1(); }); } _this.apm(); return _this; } FinancialChart.prototype.vy = function (a, b, c) { _super.prototype.vy.call(this, a, b, c); switch (a) { case "ToolbarTemplate": case "RangeSelectorTemplate": this.ahy = new FinancialChartToolbar(this, this.amf); break; case "Toolbar": var d = b; if (d != null) { d.chartTypeChanged = delegateRemove(d.chartTypeChanged, runOn(this, this.ao9)); d.trendLineTypeChanged = delegateRemove(d.trendLineTypeChanged, runOn(this, this.apc)); d.volumeTypeChanged = delegateRemove(d.volumeTypeChanged, runOn(this, this.apd)); d.l(null); } if (this.ahy != null) { this.ahy.ac = this.ah5; this.ahy.ai = this.trendLineType; this.ahy.y = this.ah0; this.ahy.al = this.ajy; if (this.alm != null) { this.ahy.l(this.alm); } var e = this.ahy; e.chartTypeChanged = delegateCombine(e.chartTypeChanged, runOn(this, this.ao9)); ; var f = this.ahy; f.trendLineTypeChanged = delegateCombine(f.trendLineTypeChanged, runOn(this, this.apc)); var g = this.ahy; g.volumeTypeChanged = delegateCombine(g.volumeTypeChanged, runOn(this, this.apd)); } break; case "ChartType": if (this.ahy != null) { this.ahy.y = this.ah0; } break; case "VolumeType": if (this.ahy != null) { this.ahy.ac = this.ah5; } break; case "TrendLineType": if (this.ahy != null) { this.ahy.ai = this.trendLineType; } break; case "IsToolbarVisible": if (this.ahy == null) { break; } this.ahy.al = this.ajy; this.setGridRows(); break; } }; FinancialChart.prototype.apd = function (a, b) { this.ah5 = this.ahy.ac; }; FinancialChart.prototype.apc = function (a, b) { this.trendLineType = this.ahy.ai; }; FinancialChart.prototype.ao9 = function (a, b) { this.ah0 = this.ahy.y; }; FinancialChart.prototype.apm = function () { this.air = new IndicatorPane(); this.aii = TypeRegistrar.create("FinancialLegend"); }; FinancialChart.prototype.provideGrid = function (a) { this.alp = a; this.ap7(); this.setGridRows(); if (this.ahy != null) { this.ahy.bg(a); } }; FinancialChart.prototype.onDocumentClick = function (a) { if (this.ahy != null) { this.ahy.bl(a); } }; FinancialChart.prototype.getContext = function () { var a = this.ahy.v(); var b = new FinancialChartContext(); b.vm = new FinancialChartViewModel(); b.vm.toolbar = a; b.container = this.lt; b.toolbarContainer = this.alm; b.legendContainer = this.all; b.indicatorsContainer = this.alk; b.volumeContainer = this.aln; b.zoomContainer = this.alo; 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.ahy == null) { this.ahy = new FinancialChartToolbar(this, this.amf); } this.ahy.w.isIndicatorMenuVisible = this.ajp && this.ajq; this.alm = b.getSubRenderer(d); this.ahy.l(this.alm); 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.all = b.getSubRenderer(f); var g = b.createElement("div"); g.setStyleProperty("width", "100%"); g.setStyleProperty("height", "100%"); this.alk = b.getSubRenderer(g); var h = b.createElement("div"); h.setStyleProperty("width", "100%"); h.setStyleProperty("height", "100%"); this.aln = b.getSubRenderer(h); var i = b.createElement("div"); i.setStyleProperty("width", "100%"); i.setStyleProperty("height", "100%"); this.alo = b.getSubRenderer(i); a = b.getSubRenderer(e); } else { this.alm = null; if (this.ahy != null) { this.ahy.l(null); } if (this.ajg != null) { this.ajg.provideContainer(null); this.ajg = null; } if (this.aii != null) { this.aii.provideContainer(null); } } _super.prototype.provideContainer.call(this, a); if (b != null) { if (this.volumeChart != null) { this.volumeChart.c9.b4(this.aln); } if (this.air != null) { this.air.h(this.alk); } if (this.zoomSliderChart != null) { this.zoomSliderChart.c9.b4(this.alo); if (a != null) { this.aot(); } else { this.ajg = null; } } if (this.aii != null) { this.aii.provideContainer(this.all); } this.setGridRows(); } }; FinancialChart.prototype.apx = function (a, b, c) { if (a != null) { a.provideContainer(null); } if (b != null) { b.c9.b4(c); } this.setGridRows(); }; FinancialChart.prototype.aqb = function (a, b) { this.apx(a, b, this.alo); if (b == null) { return; } this.aot(); }; FinancialChart.prototype.aot = function () { var _this = this; if (this.alo == null) { return; } if (this.ajg != null) { this.ajg.provideContainer(null); } this.ajg = TypeRegistrar.create("ZoomSlider"); this.ajg.provideContainer(this.alo); var a = this.ajg; a.windowRectChanged = delegateCombine(a.windowRectChanged, function (a, b) { if (_this.dataChart != null) { _this.dataChart.wl = new Rect(0, _this.ajg.windowRect.left, _this.dataChart.v4.top, _this.ajg.windowRect.width, _this.dataChart.v4.height); } }); this.aou(); }; FinancialChart.prototype.ap9 = function (a, b) { this.apx(a, b, this.aln); }; FinancialChart.prototype.setGridRows = function () { if (this.alp == null) { return; } var a = new Array(6); a[0] = (this.ajy ? this.ak6 : 0) + "px"; a[1] = this.aju ? "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.ajg != null) { if (a[5] == "0px") { this.ajg.hide(); } else { this.ajg.show(); } } this.alp.setStyleProperty("-ms-grid-rows", stringReplace(stringJoin.apply(void 0, __spreadArray([" "], __read(a))), "auto", "1fr")); this.alp.setStyleProperty("grid-template-rows", stringJoin.apply(void 0, __spreadArray([" "], __read(a)))); if (this.lt == null) { return; } if (this.dataChart != null) { this.dataChart.notifyContainerResized(); } if (this.air != null) { this.air.f(); } if (this.volumeChart != null) { this.volumeChart.notifyContainerResized(); } if (this.zoomSliderChart != null) { this.zoomSliderChart.notifyContainerResized(); } if (this.ajg != null) { this.ajg.notifySizeChanged(); } }; FinancialChart.prototype.u5 = function () { var e_1, _a; _super.prototype.u5.call(this); this.aad = 1; this.afs = 0; this.aca = 0; this.agm = null; this.agf = AxisDefaults.g; this.abu = AxisDefaults.e; this.abt = AxisDefaults.f; this.agg = AxisDefaults.j; this.agc = null; this.aqd = AxisDefaults.h; this.alj = AxisDefaults.b; this.finalValueAnnotationsVisible = true; this.crosshairsAnnotationEnabled = true; this.gn = false; this.crosshairsDisplayMode = 0; this.jl = Defaults.j; this.yc = Defaults.ae; this.x7 = Defaults.af; this.x8 = Defaults.ag; this.j5 = NaN; this.jx = 40; this.g3 = true; this.hb = false; if (this.dataChart != null) { var a = this.dataChart.c9.j.e(); this.ag9 = a.d; this.aha = a.e; this.ag8 = a.d; this.aqd = this.dataChart.aaq; } var b = new BrushCollection(); b.add(((function () { var $ret = new Brush(); $ret.fill = "#8BDC5C"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#8961A9"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#6DB1FF"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#82E9D9"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#EA3C63"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#735656"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#F8CE4F"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#A8A8B7"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#E051A9"; return $ret; })())); b.add(((function () { var $ret = new Brush(); $ret.fill = "#FF903B"; return $ret; })())); var c = new BrushCollection(); try { for (var _b = __values(fromEnum(b)), _c = _b.next(); !_c.done; _c = _b.next()) { var d = _c.value; c.add(BrushUtil.n(d, 0.3)); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } this.ahb = c; this.ahc = b; }; FinancialChart.prototype.apt = function () { if (this.air != null) { this.air.b = null; this.air.b = this.indicatorCharts; } this.setGridRows(); }; FinancialChart.prototype.apu = function () { this.setGridRows(); }; FinancialChart.prototype.ap3 = function () { this.apt(); }; FinancialChart.prototype.aos = function () { if (this.ajg == null || this.zoomSliderChart == null || this.dataChart == null || this.dataChart.series.count == 0) { return; } var a = this.lt.rootWrapper.width(); var b = this.dataChart.wk.left + this.dataChart.wk.width; var c = this.dataChart.wk.left; var d = a - b; this.ajg.startInset = c - this.ajg.trackStartInset; this.ajg.endInset = d - this.ajg.trackEndInset; if (this.ajg.endInset < 0) { var e = this.ajg.endInset; this.ajg.endInset = 0; this.dataChart.h7 += (e * -1); } if (this.ajg.startInset < 0) { var f = this.ajg.startInset; this.ajg.startInset = 0; this.dataChart.h2 += (f * -1); } this.zoomSliderChart.h2 = c; this.zoomSliderChart.h7 = d; this.zoomSliderChart.hp = this.ajg.barExtent; }; FinancialChart.prototype.apj = function () { this.aos(); }; FinancialChart.prototype.u2 = function (a) { _super.prototype.u2.call(this, a); if (a != null) { a.ho = 0; } }; FinancialChart.prototype.aqe = function (a) { return a.vx(); }; FinancialChart.prototype.aqh = function () { return this.all == null ? null : this.aqg(this.all.rootWrapper); }; FinancialChart.prototype.aqf = function (a) { if (a == null || a.d == null) { return null; } return this.aqg(a.d.rootWrapper); }; FinancialChart.prototype.aqg = 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.ak1 = function () { if (this.alp == null) { return NaN; } var a = this.alp.getOffset(); return this.alp.width() + (a == null ? 0 : a.left); }; FinancialChart.prototype.ve = function (source_, a, b) { _super.prototype.ve.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.oe(source_, a, b); } }; FinancialChart.prototype.vf = function (source_, a, b) { _super.prototype.vf.call(this, source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.of(source_, a, b); } }; FinancialChart.prototype.vd = function (source_) { _super.prototype.vd.call(this, source_); if (this.zoomSliderChart != null) { this.zoomSliderChart.n7(source_); } }; FinancialChart.prototype.vh = function (source_, a, b, c) { _super.prototype.vh.call(this, source_, a, b, c); if (this.zoomSliderChart != null) { this.zoomSliderChart.og(source_, a, b, c); } }; FinancialChart.prototype.u8 = function (a, b) { _super.prototype.u8.call(this, a, b); if (this.ajv(a)) { a.toolTip = null; } }; Object.defineProperty(FinancialChart.prototype, "ahy", { get: function () { return this.ahx; }, set: function (a) { var b = this.ahy; if (a != b) { this.ahx = a; this.vu("Toolbar", b, this.ahy); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ame", { get: function () { return this.al7; }, set: function (a) { var b = this.ame; if (a != b) { this.al7 = a; this.vu("RangeSelectorTemplate", b, this.ame); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amf", { get: function () { return this.al8; }, set: function (a) { var b = this.amf; if (a != b) { this.al8 = a; this.vu("ToolbarTemplate", b, this.amf); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amb", { get: function () { return this.al4; }, set: function (a) { var b = this.amb; if (a != b) { this.al4 = a; this.vu("ChartTypePickerTemplate", b, this.amb); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amg", { get: function () { return this.al9; }, set: function (a) { var b = this.amg; if (a != b) { this.al9 = a; this.vu("TrendLineTypePickerTemplate", b, this.amg); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amh", { get: function () { return this.ama; }, set: function (a) { var b = this.amh; if (a != b) { this.ama = a; this.vu("VolumeTypePickerTemplate", b, this.amh); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amc", { get: function () { return this.al5; }, set: function (a) { var b = this.amc; if (a != b) { this.al5 = a; this.vu("IndicatorMenuTemplate", b, this.amc); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "amd", { get: function () { return this.al6; }, set: function (a) { var b = this.amd; if (a != b) { this.al6 = a; this.vu("OverlayPickerTemplate", b, this.amd); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ajg", { get: function () { return this.ajf; }, set: function (a) { var b = this.ajg; if (a != b) { this.ajf = a; this.vu("ZoomSlider", b, this.ajg); } }, enumerable: false, configurable: true }); FinancialChart.prototype.get_jx = function () { return _super.prototype.get_jx.call(this); }; FinancialChart.prototype.set_jx = function (a) { _super.prototype.set_jx.call(this, a); }; FinancialChart.prototype.get_g3 = function () { return _super.prototype.get_g3.call(this); }; FinancialChart.prototype.set_g3 = function (a) { _super.prototype.set_g3.call(this, a); }; Object.defineProperty(FinancialChart.prototype, "ak6", { get: function () { return this.akp; }, set: function (a) { var b = this.ak6; if (a != b) { this.akp = a; this.vu("ToolbarHeight", b, this.ak6); } }, enumerable: false, configurable: true }); FinancialChart.prototype.z2 = function () { return this.xAxis; }; FinancialChart.prototype.z3 = function () { return this.yAxis; }; FinancialChart.prototype.onAttachedToUI = function () { _super.prototype.onAttachedToUI.call(this); if (this.ajg != null) { this.ajg.onAttachedToUI(); } }; FinancialChart.prototype.onDetachedFromUI = function () { _super.prototype.onDetachedFromUI.call(this); if (this.ajg != null) { this.ajg.onDetachedFromUI(); } }; FinancialChart.prototype.be = function (a) { return 20; }; FinancialChart.prototype.get_hx = function () { return ((function () { var $ret = new List$1(DataSeriesType_$type, 0); $ret.add(20); return $ret; })()); }; Object.defineProperty(FinancialChart.prototype, "hx", { get: function () { return this.get_hx(); }, enumerable: false, configurable: true }); FinancialChart.prototype.get_hw = 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, "hw", { get: function () { return this.get_hw(); }, enumerable: false, configurable: true }); FinancialChart.prototype.ahk = function (a) { return this.ahl(a); }; FinancialChart.prototype.aiy = function (a) { return this.aiz(a); }; FinancialChart.prototype.ahj = function (a) { var b = this.ahk(0); b.name = a; return b; }; FinancialChart.prototype.ug = function () { this.xAxis = this.ahj("xAxis"); this.yAxis = this.aiy(0); this.yAxis.name = "yAxis"; this.volumeAxis = this.aiy(0); this.volumeAxis.name = "volumeAxis"; this.volumeXAxis = this.ahj("volumeXAxis"); this.akc = new List$1(NumericYAxis.$, 0); this.ake = new List$1(CategoryAxisBase.$, 0); this.indicatorAxis = this.aiy(0); this.indicatorAxis.name = "indicatorAxis"; this.indicatorXAxis = this.ahj("indicatorXAxis_0"); this.akc.add(this.indicatorAxis); this.ake.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.aiy(0); this.zoomSliderAxis.name = "zoomSliderAxis"; this.zoomSliderXAxis = this.ahj("zoomSliderXAxis"); if (this.zoomSliderAxis.az == null) { this.zoomSliderAxis.az = new AxisLabelSettings(); } if (this.zoomSliderXAxis.az == null) { this.zoomSliderXAxis.az = new AxisLabelSettings(); } }; FinancialChart.prototype.ua = function (a, b) { var c = typeCast(MarkerSeries.$, a); if (c != null) { c.w9 = this.c2(a, b); } }; FinancialChart.prototype.c1 = function (a) { if (a != null) { return 1; } return _super.prototype.c1.call(this, a); }; FinancialChart.prototype.wn = function (a) { if (a.suggestedSecondaryAxis == 2) { this.yAxis.lo = true; this.yAxis.mm = 10; } }; FinancialChart.prototype.wq = function () { this.yAxis.lo = this.aj5; this.yAxis.mm = this.al3; }; FinancialChart.prototype.ah2 = function (a) { var b; if (this.ah0 == 0) { if (a == null || a.index > 0 || stringIsNullOrEmpty(a.getMemberPathFor(12))) { b = 4; } else { b = 2; } } else { b = this.ah0; } b = this.ah1(b); return b; }; FinancialChart.prototype.ah1 = 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.aib = 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.ah4 = 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.amq = function (a) { var b = a.getMemberPathFor(14); if (stringIsNullOrEmpty(b)) { b = a.getMemberPathFor(11); } return b; }; FinancialChart.prototype.ahl = 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.aiz = 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.ai5 = function () { return this.de(1); }; FinancialChart.prototype.ai6 = function () { return this.de(0); }; FinancialChart.prototype.ai4 = function () { return this.de(2); }; FinancialChart.prototype.ai7 = function () { return this.de(20); }; Object.defineProperty(FinancialChart.prototype, "ajo", { get: function () { return (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aim", { 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, "ajr", { get: function () { return (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aik", { 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, "ajp", { get: function () { return (TypeRegistrar.isRegistered("IndicatorProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "aio", { 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, "ajq", { get: function () { return (TypeRegistrar.isRegistered("OverlayProxy")); }, enumerable: false, configurable: true }); Object.defineProperty(FinancialChart.prototype, "ait", { 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.amq(a); switch (this.ah2(a)) { case 3: var d = this.ai5(); this.aim.setValueMemberPath(d, c); this.aim.setXAxis(d, this.xAxis); this.aim.setYAxis(d, this.yAxis); this.aim.setCategoryMode(d, 1); return d; case 4: var e = this.ai6(); this.aim.setValueMemberPath(e, c); this.aim.setXAxis(e, this.xAxis); this.aim.setYAxis(e, this.yAxis); this.aim.setCategoryMode(e, 1); return e; default: case 1: case 2: var f = this.ai7(); this.aik.setOpenMemberPath(f, a.getMemberPathFor(11)); this.aik.setHighMemberPath(f, a.getMemberPathFor(12)); this.aik.setLowMemberPath(f, a.getMemberPathFor(13)); this.aik.setCloseMemberPath(f, a.getMemberPathFor(14)); this.aik.setVolumeMemberPath(f, a.getMemberPathFor(15)); this.aik.setXAxis(f, this.xAxis); this.aik.setYAxis(f, this.yAxis); this.aik.setDisplayType(f, this.ah0 == 1 ? 1 : 0); this.aik.setCategoryMode(f, 1); return f; } }; FinancialChart.prototype.wp = function () { _super.prototype.wp.call(this); this.aph(this.xAxis); this.ap5(false); if (this.ah5 != 0 && this.volumeChart != null) { this.apo(); } this.aph(this.volumeXAxis); this.aph(this.indicatorXAxis); this.ap2(); this.ap4(); if (this.aic != 0) { this.app(); this.aph(this.zoomSliderXAxis); } }; FinancialChart.prototype.afe = function (a, b) { var e_2, _a; _super.prototype.afe.call(this, a, b); a(this.volumeXAxis); if (this.ake != null) { try { for (var _b = __values(fromEnum(this.ake)), _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.afj = function (a, b) { var e_3, _a; _super.prototype.afj.call(this, a, b); if (b) { a(this.volumeAxis); if (this.akc != null) { try { for (var _b = __values(fromEnum(this.akc)), _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.apl = function (a) { var b = typeCast(IZoomableCategoryAxis_$type, this.xAxis); if (b != null) { a(b); } }; FinancialChart.prototype.afh = function (a) { _super.prototype.afh.call(this, a); this.ae8(this.volumeXAxis, a); this.ae8(this.indicatorXAxis, a); this.ae8(this.zoomSliderXAxis, a); }; FinancialChart.prototype.afm = function (a) { _super.prototype.afm.call(this, a); this.ae8(this.volumeAxis, a); this.ae8(this.indicatorAxis, a); this.ae8(this.zoomSliderAxis, a); }; FinancialChart.prototype.afk = function (a) { _super.prototype.afk.call(this, a); this.ae7(this.volumeAxis, a); this.ae7(this.indicatorAxis, a); this.ae7(this.zoomSliderAxis, a); }; FinancialChart.prototype.aff = function (a) { _super.prototype.aff.call(this, a); this.ae7(this.volumeXAxis, a); this.ae7(this.indicatorXAxis, a); this.ae7(this.zoomSliderXAxis, a); }; FinancialChart.prototype.u1 = function (a) { var _this = this; _super.prototype.u1.call(this, a); if (a == null) { return; } if (a == this.zoomSliderChart) { a.xg = a.xj = 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.anl(); $ret.synchronizeHorizontally = true; $ret.synchronizeVertically = false; return $ret; })())); SyncManager.c(a); } a.cw = 2; }; FinancialChart.prototype.anl = function () { if (this.ami == null) { FinancialChart.al2++; this.ami = FinancialChart.al2.toString(); } return this.ami; }; FinancialChart.prototype.ao3 = function (a, b) { this.aop(); this.apj(); }; FinancialChart.prototype.aop = function () { var e_4, _a; if (this.yAxis.b8()) { return; } var a = this.yAxis.aw.bd; if (this.ah5 != 0) { a = Math.max(a, this.volumeAxis.aw.bd); } try { for (var _b = __values(fromEnum(this.akc)), _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.aoq(a); }; FinancialChart.prototype.aoq = 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.akc)), _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.aov = 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.ajt(e))) { continue; } a(c.series._inner[d], b); } } }; FinancialChart.prototype.aoy = 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.es) { continue; } a(this.volumeChart.series._inner[b], b); } }; FinancialChart.prototype.aow = 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.ajv(c)) { continue; } a(c, b); } }; FinancialChart.prototype.aox = 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.ajv(d)) { continue; } var e = this.alw(d, c); a(d, e); } if (b) { this.aoz(a); } }; FinancialChart.prototype.aoz = 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.es) { continue; } a(this.zoomSliderChart.series._inner[b], b); } }; FinancialChart.prototype.alw = functi