UNPKG

igniteui-angular-charts

Version:

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

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