UNPKG

igniteui-angular-charts

Version:

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

1,406 lines 139 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 { 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 */ export let FinancialChart = /*@__PURE__*/ (() => { class FinancialChart extends XYChart { constructor() { super(); 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) { let a = this.xAxisBreaks; a.collectionChanged = delegateCombine(a.collectionChanged, (a, b) => this.ap1()); } this.apm(); } vy(a, b, c) { super.vy(a, b, c); switch (a) { case "ToolbarTemplate": case "RangeSelectorTemplate": this.ahy = new FinancialChartToolbar(this, this.amf); break; case "Toolbar": let 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); } let e = this.ahy; e.chartTypeChanged = delegateCombine(e.chartTypeChanged, runOn(this, this.ao9)); ; let f = this.ahy; f.trendLineTypeChanged = delegateCombine(f.trendLineTypeChanged, runOn(this, this.apc)); let 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; } } apd(a, b) { this.ah5 = this.ahy.ac; } apc(a, b) { this.trendLineType = this.ahy.ai; } ao9(a, b) { this.ah0 = this.ahy.y; } apm() { this.air = new IndicatorPane(); this.aii = TypeRegistrar.create("FinancialLegend"); } provideGrid(a) { this.alp = a; this.ap7(); this.setGridRows(); if (this.ahy != null) { this.ahy.bg(a); } } onDocumentClick(a) { if (this.ahy != null) { this.ahy.bl(a); } } getContext() { let a = this.ahy.v(); let 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; } provideContainer(a) { let b = a; if (b != null) { let c = "financialChartMainGrid"; let 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); let e = b.createElement("div"); e.setStyleProperty("width", "100%"); e.setStyleProperty("height", "100%"); let f = b.createElement("div"); f.setStyleProperty("width", "100%"); f.setStyleProperty("height", "100%"); this.all = b.getSubRenderer(f); let g = b.createElement("div"); g.setStyleProperty("width", "100%"); g.setStyleProperty("height", "100%"); this.alk = b.getSubRenderer(g); let h = b.createElement("div"); h.setStyleProperty("width", "100%"); h.setStyleProperty("height", "100%"); this.aln = b.getSubRenderer(h); let 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.provideContainer(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(); } } apx(a, b, c) { if (a != null) { a.provideContainer(null); } if (b != null) { b.c9.b4(c); } this.setGridRows(); } aqb(a, b) { this.apx(a, b, this.alo); if (b == null) { return; } this.aot(); } aot() { if (this.alo == null) { return; } if (this.ajg != null) { this.ajg.provideContainer(null); } this.ajg = TypeRegistrar.create("ZoomSlider"); this.ajg.provideContainer(this.alo); let a = this.ajg; a.windowRectChanged = delegateCombine(a.windowRectChanged, (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(); } ap9(a, b) { this.apx(a, b, this.aln); } setGridRows() { if (this.alp == null) { return; } let 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(" ", ...a), "auto", "1fr")); this.alp.setStyleProperty("grid-template-rows", stringJoin(" ", ...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(); } } u5() { super.u5(); 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) { let a = this.dataChart.c9.j.e(); this.ag9 = a.d; this.aha = a.e; this.ag8 = a.d; this.aqd = this.dataChart.aaq; } let b = new BrushCollection(); b.add(((() => { let $ret = new Brush(); $ret.fill = "#8BDC5C"; return $ret; })())); b.add(((() => { let $ret = new Brush(); $ret.fill = "#8961A9"; return $ret; })())); b.add(((() => { let $ret = new Brush(); $ret.fill = "#6DB1FF"; return $ret; })())); b.add(((() => { let $ret = new Brush(); $ret.fill = "#82E9D9"; return $ret; })())); b.add(((() => { let $ret = new Brush(); $ret.fill = "#EA3C63"; return $ret; })())); b.add(((() => { let $ret = new Brush(); $ret.fill = "#735656"; return $ret; })())); b.add(((() => { let $ret = new Brush(); $ret.fill = "#F8CE4F"; return $ret; })())); b.add(((() => { let $ret = new Brush(); $ret.fill = "#A8A8B7"; return $ret; })())); b.add(((() => { let $ret = new Brush(); $ret.fill = "#E051A9"; return $ret; })())); b.add(((() => { let $ret = new Brush(); $ret.fill = "#FF903B"; return $ret; })())); let c = new BrushCollection(); for (let d of fromEnum(b)) { c.add(BrushUtil.n(d, 0.3)); } this.ahb = c; this.ahc = b; } apt() { if (this.air != null) { this.air.b = null; this.air.b = this.indicatorCharts; } this.setGridRows(); } apu() { this.setGridRows(); } ap3() { this.apt(); } aos() { if (this.ajg == null || this.zoomSliderChart == null || this.dataChart == null || this.dataChart.series.count == 0) { return; } let a = this.lt.rootWrapper.width(); let b = this.dataChart.wk.left + this.dataChart.wk.width; let c = this.dataChart.wk.left; let d = a - b; this.ajg.startInset = c - this.ajg.trackStartInset; this.ajg.endInset = d - this.ajg.trackEndInset; if (this.ajg.endInset < 0) { let e = this.ajg.endInset; this.ajg.endInset = 0; this.dataChart.h7 += (e * -1); } if (this.ajg.startInset < 0) { let 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; } apj() { this.aos(); } u2(a) { super.u2(a); if (a != null) { a.ho = 0; } } aqe(a) { return a.vx(); } aqh() { return this.all == null ? null : this.aqg(this.all.rootWrapper); } aqf(a) { if (a == null || a.d == null) { return null; } return this.aqg(a.d.rootWrapper); } aqg(a) { if (a == null) { return null; } let b = a.getOffset(); return new Rect(0, b.left, b.top, a.width(), a.height()); } ak1() { if (this.alp == null) { return NaN; } let a = this.alp.getOffset(); return this.alp.width() + (a == null ? 0 : a.left); } ve(source_, a, b) { super.ve(source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.oe(source_, a, b); } } vf(source_, a, b) { super.vf(source_, a, b); if (this.zoomSliderChart != null) { this.zoomSliderChart.of(source_, a, b); } } vd(source_) { super.vd(source_); if (this.zoomSliderChart != null) { this.zoomSliderChart.n7(source_); } } vh(source_, a, b, c) { super.vh(source_, a, b, c); if (this.zoomSliderChart != null) { this.zoomSliderChart.og(source_, a, b, c); } } u8(a, b) { super.u8(a, b); if (this.ajv(a)) { a.toolTip = null; } } get ahy() { return this.ahx; } set ahy(a) { let b = this.ahy; if (a != b) { this.ahx = a; this.vu("Toolbar", b, this.ahy); } } get ame() { return this.al7; } set ame(a) { let b = this.ame; if (a != b) { this.al7 = a; this.vu("RangeSelectorTemplate", b, this.ame); } } get amf() { return this.al8; } set amf(a) { let b = this.amf; if (a != b) { this.al8 = a; this.vu("ToolbarTemplate", b, this.amf); } } get amb() { return this.al4; } set amb(a) { let b = this.amb; if (a != b) { this.al4 = a; this.vu("ChartTypePickerTemplate", b, this.amb); } } get amg() { return this.al9; } set amg(a) { let b = this.amg; if (a != b) { this.al9 = a; this.vu("TrendLineTypePickerTemplate", b, this.amg); } } get amh() { return this.ama; } set amh(a) { let b = this.amh; if (a != b) { this.ama = a; this.vu("VolumeTypePickerTemplate", b, this.amh); } } get amc() { return this.al5; } set amc(a) { let b = this.amc; if (a != b) { this.al5 = a; this.vu("IndicatorMenuTemplate", b, this.amc); } } get amd() { return this.al6; } set amd(a) { let b = this.amd; if (a != b) { this.al6 = a; this.vu("OverlayPickerTemplate", b, this.amd); } } get ajg() { return this.ajf; } set ajg(a) { let b = this.ajg; if (a != b) { this.ajf = a; this.vu("ZoomSlider", b, this.ajg); } } get_jx() { return super.get_jx(); } set_jx(a) { super.set_jx(a); } get_g3() { return super.get_g3(); } set_g3(a) { super.set_g3(a); } get ak6() { return this.akp; } set ak6(a) { let b = this.ak6; if (a != b) { this.akp = a; this.vu("ToolbarHeight", b, this.ak6); } } z2() { return this.xAxis; } z3() { return this.yAxis; } onAttachedToUI() { super.onAttachedToUI(); if (this.ajg != null) { this.ajg.onAttachedToUI(); } } onDetachedFromUI() { super.onDetachedFromUI(); if (this.ajg != null) { this.ajg.onDetachedFromUI(); } } be(a) { return 20; } get_hx() { return ((() => { let $ret = new List$1(DataSeriesType_$type, 0); $ret.add(20); return $ret; })()); } get hx() { return this.get_hx(); } get_hw() { return ((() => { let $ret = new List$1(IDataSeriesAdapterRule_$type, 0); $ret.add(new SimpleFinancialPriceSeriesRule()); $ret.add(new SubCollectionsRule()); return $ret; })()); } get hw() { return this.get_hw(); } ahk(a) { return this.ahl(a); } aiy(a) { return this.aiz(a); } ahj(a) { let b = this.ahk(0); b.name = a; return b; } ug() { 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(); } } ua(a, b) { let c = typeCast(MarkerSeries.$, a); if (c != null) { c.w9 = this.c2(a, b); } } c1(a) { if (a != null) { return 1; } return super.c1(a); } wn(a) { if (a.suggestedSecondaryAxis == 2) { this.yAxis.lo = true; this.yAxis.mm = 10; } } wq() { this.yAxis.lo = this.aj5; this.yAxis.mm = this.al3; } ah2(a) { let 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; } ah1(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; } aib(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; } ah4(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; } amq(a) { let b = a.getMemberPathFor(14); if (stringIsNullOrEmpty(b)) { b = a.getMemberPathFor(11); } return b; } ahl(axisType_) { if ((this.externalObject)) { return (this.externalObject.createXAxis(axisType_).i); } else { let a; 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; } } aiz(axisType_) { if ((this.externalObject)) { return (this.externalObject.createYAxis(axisType_).i); } else { let a; 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; } } ai5() { return this.de(1); } ai6() { return this.de(0); } ai4() { return this.de(2); } ai7() { return this.de(20); } get ajo() { return (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")); } get aim() { if (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")) { return TypeRegistrar.create("HorizontalAnchoredCategorySeriesProxy"); } else { throw new BaseError(1, "horizontal series module is not loaded, but is required."); } } get ajr() { return (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")); } get aik() { if (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")) { return TypeRegistrar.create("FinancialPriceSeriesProxy"); } else { throw new BaseError(1, "financial series module is not loaded, but is required."); } } get ajp() { return (TypeRegistrar.isRegistered("IndicatorProxy")); } get aio() { if (TypeRegistrar.isRegistered("IndicatorProxy")) { return TypeRegistrar.create("IndicatorProxy"); } else { throw new BaseError(1, "financial series module is not loaded, but is required."); } } get ajq() { return (TypeRegistrar.isRegistered("OverlayProxy")); } get ait() { if (TypeRegistrar.isRegistered("OverlayProxy")) { return TypeRegistrar.create("OverlayProxy"); } else { throw new BaseError(1, "overlay series module is not loaded, but is required."); } } dc(a, b) { let c = this.amq(a); switch (this.ah2(a)) { case 3: let 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: let 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: let 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; } } wp() { super.wp(); 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); } } afe(a, b) { super.afe(a, b); a(this.volumeXAxis); if (this.ake != null) { for (let c of fromEnum(this.ake)) { a(c); } } let d = true; switch (b) { case "XAxisMajorStroke": case "XAxisMajorStrokeThickness": d = false; break; } if (d) { a(this.zoomSliderXAxis); } } afj(a, b) { super.afj(a, b); if (b) { a(this.volumeAxis); if (this.akc != null) { for (let c of fromEnum(this.akc)) { a(c); } } a(this.zoomSliderAxis); } } apl(a) { let b = typeCast(IZoomableCategoryAxis_$type, this.xAxis); if (b != null) { a(b); } } afh(a) { super.afh(a); this.ae8(this.volumeXAxis, a); this.ae8(this.indicatorXAxis, a); this.ae8(this.zoomSliderXAxis, a); } afm(a) { super.afm(a); this.ae8(this.volumeAxis, a); this.ae8(this.indicatorAxis, a); this.ae8(this.zoomSliderAxis, a); } afk(a) { super.afk(a); this.ae7(this.volumeAxis, a); this.ae7(this.indicatorAxis, a); this.ae7(this.zoomSliderAxis, a); } aff(a) { super.aff(a); this.ae7(this.volumeXAxis, a); this.ae7(this.indicatorXAxis, a); this.ae7(this.zoomSliderXAxis, a); } u1(a) { super.u1(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, ((() => { let $ret = new SyncSettings(); $ret.syncChannel = this.anl(); $ret.synchronizeHorizontally = true; $ret.synchronizeVertically = false; return $ret; })())); SyncManager.c(a); } a.cw = 2; } anl() { if (this.ami == null) { FinancialChart.al2++; this.ami = FinancialChart.al2.toString(); } return this.ami; } ao3(a, b) { this.aop(); this.apj(); } aop() { if (this.yAxis.b8()) { return; } let a = this.yAxis.aw.bd; if (this.ah5 != 0) { a = Math.max(a, this.volumeAxis.aw.bd); } for (let b of fromEnum(this.akc)) { a = Math.max(a, b.aw.bd); } this.aoq(a); } aoq(a) { if (this.yAxis.b8()) { return; } this.yAxis.eu = this.volumeAxis.eu = a; for (let b of fromEnum(this.akc)) { b.eu = a; } this.zoomSliderAxis.eu = this.yAxis.eu; } aov(a) { if (this.indicatorCharts == null) { return; } for (let b = 0; b < this.indicatorCharts.count; b++) { let c = this.indicatorCharts._inner[b]; for (let d = 0; d < c.series.count; d++) { let e = c.series._inner[d]; if (!(this.ajt(e))) { continue; } a(c.series._inner[d], b); } } } aoy(a) { if (this.volumeChart == null) { return; } for (let b = 0; b < this.volumeChart.series.count; b++) { let c = this.volumeChart.series._inner[b]; if (c.es) { continue; } a(this.volumeChart.series._inner[b], b); } } aow(a) { if (this.dataChart == null) { return; } for (let b = 0; b < this.dataChart.series.count; b++) { let c = this.dataChart.series._inner[b]; if (!this.ajv(c)) { continue; } a(c, b); } } aox(a, b) { if (this.dataChart == null) { return; } for (let c = 0; c < this.dataChart.series.count; c++) { let d = this.dataChart.series._inner[c]; if (this.ajv(d)) { continue; } let e = this.alw(d, c); a(d, e); } if (b) { this.aoz(a); } } aoz(a) { if (this.zoomSliderChart == null) { return; } for (let b = 0; b < this.zoomSliderChart.series.count; b++) { let c = this.zoomSliderChart.series._inner[b]; if (c.es) { continue; } a(this.zoomSliderChart.series._inner[b], b); } } alw(a, b) { if (a.c9 != this.dataChart) { return b; } let c = this.bf == null || this.bf.dataSeries == null ? 0 : this.bf.dataSeries.count; let d = this.aig == null ? 0 : this.aig.count; return b - (c * d); } uq(a) { super.uq(a); this.aoy(a); this.aov(a); this.aoz(a); } get volumeChart() { return this.ajb; } set volumeChart(a) { let b = this.volumeChart; if (a != b) { this.ajb = a; this.vu("VolumeChart", b, this.volumeChart); } } apo() { if (this.dataChart == null) { return; } this.volumeChart.series.clear(); let a = new List$1(Series.$, 0); let b = -1; for (let c = 0; c < this.dataChart.series.count; c++) { let d = this.dataChart.series._inner[c]; if (this.ajv(d) || d.es) { continue; } b++; let e; let f = this.ah5; f = this.ah4(f); switch (f) { case 2: e = this.ai6(); break; case 3: e = this.ai4(); break; default: case 1: e = this.ai5(); break; } this.aim.setCategoryMode(e, 1); e.name = "volumeSeries_" + b; e.itemsSource = d.itemsSource; this.aim.setXAxis(e, this.volumeXAxis); this.aim.setYAxis(e, this.volumeAxis); this.aim.setValueMemberPath(e, this.bf != null && this.bf.dataSeries != null && this.bf.dataSeries.count > b ? this.bf.dataSeries._inner[b].getMemberPathFor(15) : null); e.title = d.title + " Volume"; e.ve = ArrayExtension.getModulus$1(Brush.$, this.ahd, b); e.vu = ArrayExtension.getModulus$1(Brush.$, this.ahe, b); e.jo = this.ak7; a.add(e); } let g = this.ht("volume", false); if (g != null) { a.o(g); } for (let h = 0; h < a.count; h++) { let i = a._inner[h]; this.volumeChart.series.add(i); this.u6(i, h); } } ajs(a) { if (!this.ajo) { return false; } return this.aim.matchesType(a); } ajw(a) { if (!this.ajr) { return false; } return this.aik.matchesType(a); } ajt(a) { if (!this.ajp) { return false; } return this.aio.matchesType(a); } ajv(a) { if (!this.ajq) { return false; } return this.ait.matchesType(a); } apn() { if (this.dataChart == null) { return; } let a = 0; let b = this.aie == null ? 0 : this.aie.count; let c = this.customIndicatorNames == null ? 0 : this.customIndicatorNames.count; let d = b + c; for (let e = 0; e < d; e++) { let f = new List$1(Series.$, 0); let g = this.indicatorCharts._inner[e]; let h = e >= b; let i = h ? this.customIndicatorNames._inner[e - b] : EnumUtil.getName(FinancialIndicatorType_$type, this.aie._inner[e]); let j = -1; for (let k = 0; k < this.dataChart.series.count; k++) { let l = this.dataChart.series._inner[k]; if (this.ajv(l) || l.es) { continue; } j++; let m; if (h) { let n = this.ai8("Custom"); this.aio.handleCustomIndicatorEvent(n, runOn(this, this.ao1)); m = n; } else { m = this.aja(this.aie._inner[e]); } if (m == null) { continue; } m.name = "indicator_" + a++; this.aio.setXAxis(m, this.ake._inner[e]); this.aio.setYAxis(m, this.akc._inner[e]); m.itemsSource = l.itemsSource; this.aio.setOpenMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(11)); this.aio.setHighMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(12)); this.aio.setLowMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(13)); this.aio.s