igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,401 lines • 74.7 kB
JavaScript
/*
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 { EventArgs, Base, markType, typeCast, runOn, delegateCombine, enumGetBox, Point_$type, String_$type, Number_$type, fromEnum, toEnum, Date_$type, markDep, Delegate_$type } from "igniteui-react-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-react-core";
import { IFastItemColumn$1_$type } from "igniteui-react-core";
import { Series } from "./Series";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-react-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "igniteui-react-core";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer";
import { CategoryFrame } from "./CategoryFrame";
import { CategoryMode_$type } from "./CategoryMode";
import { ITimeRangeSelectorAxis_$type } from "./ITimeRangeSelectorAxis";
import { FastReflectionHelper } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { Dictionary$2 } from "igniteui-react-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { FinancialValueList } from "./FinancialValueList";
import { CategoryXAxis } from "./CategoryXAxis";
import { SafeSortedReadOnlyDoubleCollection } from "./SafeSortedReadOnlyDoubleCollection";
import { SafeReadOnlyDoubleCollection } from "./SafeReadOnlyDoubleCollection";
import { SafeEnumerable } from "./SafeEnumerable";
import { CalculatedColumn } from "./CalculatedColumn";
import { TrendCalculators } from "igniteui-react-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
import { dateToStringFormat } from "igniteui-react-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
/**
* @hidden
*/
export let FinancialEventArgs = /*@__PURE__*/ (() => {
class FinancialEventArgs extends EventArgs {
constructor(a, b, c, d, e) {
super();
this._position = 0;
this._count = 0;
this._dataSource = null;
this._supportingCalculations = null;
this._basedOn = null;
this.position = a;
this.count = b;
this.dataSource = c;
this.supportingCalculations = d;
if (c != null) {
c.series = e;
}
}
get position() {
return this._position;
}
set position(a) {
this._position = a;
}
get count() {
return this._count;
}
set count(a) {
this._count = a;
}
get dataSource() {
return this._dataSource;
}
set dataSource(a) {
this._dataSource = a;
}
get supportingCalculations() {
return this._supportingCalculations;
}
set supportingCalculations(a) {
this._supportingCalculations = a;
}
get basedOn() {
return this._basedOn;
}
set basedOn(a) {
this._basedOn = a;
}
}
FinancialEventArgs.$t = /*@__PURE__*/ markType(FinancialEventArgs, 'FinancialEventArgs', EventArgs.$);
return FinancialEventArgs;
})();
/**
* @hidden
*/
export let FinancialBucketCalculator = /*@__PURE__*/ (() => {
class FinancialBucketCalculator extends Base {
constructor(a) {
super();
this.a = null;
this.c = 0;
this.d = 0;
this.b = 0;
if (a == null) {
throw new ArgumentNullException(0, "view");
}
this.a = a;
this.c = -1;
this.d = this.d;
this.b = 0;
}
getBucket(a) {
return null;
}
getBucketWithoutUnknowns(a) {
return this.getBucket(a);
}
getErrorBucket(a, b) {
return NaN;
}
getBucketInfo(a, b, c, d) {
a = this.c;
b = this.d;
c = this.b;
d = this.a.cf.ie;
return {
p0: a,
p1: b,
p2: c,
p3: d
};
}
e(a) {
let b = this.a.ca;
let c = this.a.b9;
let d = this.a.b9;
if (this.a.cf != null) {
d = this.a.cf.getEffectiveViewport1(this.a);
}
if (b.isEmpty || c.isEmpty || this.a.cf.xh == null) {
this.b = 0;
return;
}
let e = (this.a.cf.xh != null) ? this.a.cf.xh.df : false;
let f = new ScalerParams(0, b, c, e, d);
let g = this.a.cf.wu(this.a);
let h = typeCast(ISortingAxis_$type, this.a.cf.xh);
if (h == null || h.i$b == null) {
let i = Math.floor(this.a.cf.xh.fw(g.left, f));
let j = Math.ceil(this.a.cf.xh.fw(g.right, f));
if (this.a.cf.xh.df) {
j = Math.ceil(this.a.cf.xh.fw(g.left, f));
i = Math.floor(this.a.cf.xh.fw(g.right, f));
}
let k = Math.floor((j - i + 1) * a / g.width);
this.b = truncate(Math.max(1, k));
this.c = truncate(Math.floor(i / this.b));
this.d = truncate(Math.ceil(j / this.b));
}
else {
this.c = h.i$e(b, c, d, g);
this.d = h.i$g(b, c, d, g);
this.b = 1;
}
}
cacheValues() {
}
unCacheValues() {
}
}
FinancialBucketCalculator.$t = /*@__PURE__*/ markType(FinancialBucketCalculator, 'FinancialBucketCalculator', Base.$, [IBucketizer_$type]);
return FinancialBucketCalculator;
})();
/**
* @hidden
*/
export let FinancialSeries = /*@__PURE__*/ (() => {
class FinancialSeries extends Series {
hu() {
let a = super.hu();
{
let b = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "OpenMemberPath";
$ret.p = true;
$ret.y = "HighlightedOpenMemberPath";
$ret.q = true;
return $ret;
})());
b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.aak));
a.add(b);
}
{
let c = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "HighMemberPath";
$ret.p = true;
$ret.y = "HighlightedHighMemberPath";
$ret.q = true;
return $ret;
})());
c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.aai));
a.add(c);
}
{
let d = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "LowMemberPath";
$ret.p = true;
$ret.y = "HighlightedLowMemberPath";
$ret.q = true;
return $ret;
})());
d.valueResolving = delegateCombine(d.valueResolving, runOn(this, this.aaj));
a.add(d);
}
{
let e = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "CloseMemberPath";
$ret.p = true;
$ret.y = "HighlightedCloseMemberPath";
$ret.q = true;
return $ret;
})());
e.valueResolving = delegateCombine(e.valueResolving, runOn(this, this.aah));
a.add(e);
}
{
let f = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "VolumeMemberPath";
$ret.p = true;
$ret.y = "HighlightedVolumeMemberPath";
$ret.q = true;
return $ret;
})());
f.valueResolving = delegateCombine(f.valueResolving, runOn(this, this.aal));
a.add(f);
}
{
let g = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Brush";
$ret.p = true;
$ret.y = "ActualBrush";
$ret.q = true;
return $ret;
})());
g.valueResolving = delegateCombine(g.valueResolving, runOn(this, this.r9));
a.add(g);
}
{
let h = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Outline";
$ret.p = true;
$ret.y = "ActualOutline";
$ret.q = true;
return $ret;
})());
h.valueResolving = delegateCombine(h.valueResolving, runOn(this, this.r9));
a.add(h);
}
{
let i = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "NegativeBrush";
$ret.p = true;
$ret.q = true;
return $ret;
})());
i.valueResolving = delegateCombine(i.valueResolving, runOn(this, this.r9));
a.add(i);
}
{
let j = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "NegativeOutline";
$ret.p = true;
$ret.q = true;
return $ret;
})());
j.valueResolving = delegateCombine(j.valueResolving, runOn(this, this.r9));
a.add(j);
}
let k = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.p = true;
$ret.ad = "IsTransitionInEnabled";
$ret.x = true;
$ret.q = true;
return $ret;
})());
a.add(k);
let l = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.p = true;
$ret.ad = "TransitionInMode";
$ret.x = enumGetBox(CategoryTransitionInMode_$type, 20);
$ret.q = true;
return $ret;
})());
a.add(l);
return a;
}
aak(a, b) {
if (this.zu != null) {
b.value = this.zu;
return;
}
b.value = this.z7;
}
aai(a, b) {
if (this.zq != null) {
b.value = this.zq;
return;
}
b.value = this.zy;
}
aaj(a, b) {
if (this.zs != null) {
b.value = this.zs;
return;
}
b.value = this.z3;
}
aah(a, b) {
if (this.zo != null) {
b.value = this.zo;
return;
}
b.value = this.zl;
}
aal(a, b) {
if (this.zw != null) {
b.value = this.zw;
return;
}
b.value = this.aab;
}
kz() {
if (this.d4()) {
return this.bo.xn;
}
else {
return this.bo.xj;
}
}
q8(a) {
super.q8(a);
this.xy = a;
}
get_e8() {
return true;
}
ai() {
return [this.xh, this.x0];
}
ku(a, b) {
let c = this.ni(b);
if (c == FinancialSeries.$$p[11]) {
return this.kv(a, b, this.z7);
}
if (c == FinancialSeries.$$p[1]) {
return this.kv(a, b, this.zy);
}
if (c == FinancialSeries.$$p[9]) {
return this.kv(a, b, this.z3);
}
if (c == FinancialSeries.$$p[0]) {
return this.kv(a, b, this.zl);
}
if (c == FinancialSeries.$$p[13]) {
return this.kv(a, b, this.aab);
}
if (c == FinancialSeries.$$p[5]) {
return this.kv(a, b, this.zu);
}
if (c == FinancialSeries.$$p[3]) {
return this.kv(a, b, this.zq);
}
if (c == FinancialSeries.$$p[4]) {
return this.kv(a, b, this.zs);
}
if (c == FinancialSeries.$$p[2]) {
return this.kv(a, b, this.zo);
}
if (c == FinancialSeries.$$p[6]) {
return this.kv(a, b, this.zw);
}
return super.ku(a, b);
}
mi(a) {
let b = this.ni(a);
if (b == FinancialSeries.$$p[11]) {
return this.z7;
}
if (b == FinancialSeries.$$p[1]) {
return this.zy;
}
if (b == FinancialSeries.$$p[9]) {
return this.z3;
}
if (b == FinancialSeries.$$p[0]) {
return this.zl;
}
if (b == FinancialSeries.$$p[13]) {
return this.aab;
}
if (b == FinancialSeries.$$p[5]) {
return this.zu;
}
if (b == FinancialSeries.$$p[3]) {
return this.zq;
}
if (b == FinancialSeries.$$p[4]) {
return this.zs;
}
if (b == FinancialSeries.$$p[2]) {
return this.zo;
}
if (b == FinancialSeries.$$p[6]) {
return this.zw;
}
return super.mi(a);
}
zh() {
return 2;
}
zf() {
return 4;
}
aj(a) {
let b = this.an(this.xh, this.xj.h, this.ze(this.cw), this.zg(this.cw), this.ws(a), true);
if (b == null) {
return null;
}
let c = b[0];
let d = b[1];
let e = new Array(1);
let f = new Array(2);
let g = this.zh();
f[0] = { $type: Point_$type, x: c[0], y: c[g] };
f[1] = { $type: Point_$type, x: d[0], y: d[g] };
e[0] = f;
return e;
}
al(a) {
let b = this.an(this.xh, this.xj.h, this.ze(this.cw), this.zg(this.cw), this.ws(a), true);
if (b == null) {
return null;
}
let c = b[0];
let d = b[1];
let e = new Array(1);
let f = new Array(2);
f[0] = { $type: Point_$type, x: c[0], y: c[1] };
f[1] = { $type: Point_$type, x: d[0], y: d[1] };
e[0] = f;
return e;
}
constructor() {
super();
this.x8 = null;
this.x6 = null;
this.x7 = null;
this.x5 = null;
this.x9 = null;
this.yi = false;
this.assigningCategoryStyle = null;
this.xq = null;
this.ys = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
this.yt = new Dictionary$2(String_$type, String_$type, 0);
this.yh = false;
this.x4 = null;
this.xl = null;
this.xn = null;
this.xj = null;
this.xt = null;
this.typical = null;
this.typicalBasedOn = null;
this.yg = false;
this.y5 = null;
this.y3 = null;
this.y4 = null;
this.y2 = null;
this.y6 = null;
this.xm = null;
this.xi = null;
this.xo = 0;
this.xz = null;
this.x1 = null;
this.xq = new CategorySeriesRenderManager();
this.yi = false;
this.xt = new CategoryTransitionSourceFramePreparer();
this.xm = new CategoryFrame(3);
this.ab = FinancialSeries.$;
this.xp = 0;
}
v7() {
return this.aa7;
}
v8() {
return this.aa7;
}
o8() {
super.o8();
this.xh = null;
this.x0 = null;
}
get_em() {
return true;
}
get_f6() {
return this.x0 != null && this.x0.df;
}
get yd() {
return this.x8;
}
set yd(a) {
if (this.x8 != a) {
let b = this.x8;
this.x8 = a;
this.raisePropertyChanged("OpenColumn", b, this.x8);
}
}
get yb() {
return this.x6;
}
set yb(a) {
if (this.x6 != a) {
let b = this.x6;
this.x6 = a;
this.raisePropertyChanged("HighColumn", b, this.x6);
}
}
get yc() {
return this.x7;
}
set yc(a) {
if (this.x7 != a) {
let b = this.x7;
this.x7 = a;
this.raisePropertyChanged("LowColumn", b, this.x7);
}
}
get ya() {
return this.x5;
}
set ya(a) {
if (this.x5 != a) {
let b = this.x5;
this.x5 = a;
this.raisePropertyChanged("CloseColumn", b, this.x5);
}
}
get yf() {
return this.x9;
}
set yf(a) {
if (this.x9 != a) {
let b = this.x9;
this.x9 = a;
this.raisePropertyChanged("VolumeColumn", b, this.x9);
}
}
gc() {
return this.highlightedItemsSource != null || (this.zu != null && this.zq != null && this.zs != null && this.zo != null);
}
yp() {
return (this.assigningCategoryStyle != null && this.yi) || this.by != 1 || this.cq != 1 || this.cp != 1;
}
aao(a) {
if (this.assigningCategoryStyle != null && this.yi) {
this.assigningCategoryStyle(this, a);
}
}
aam(a, b, c, d, e, f, g) {
let h = this.by != 1;
let i = this.cq != 1;
let j = this.cp != 1;
this.xq.a3(this.xq.b, d.dm, a, b, c, d, e, f, false, g);
this.xq.ab(this.ic);
let k = this.xq.ay;
let l = null;
let m = null;
let n = null;
let o = this.dp;
if (h && this.dc != null) {
l = this.dc.d0.getHighlightingInfo(this, o, k.z, k.y, false);
k.c = l;
}
if (i && this.dc != null) {
m = this.dc.d1.getHighlightingInfo(this, o, k.z, k.y, false);
if (m == null && this.bo != null) {
m = this.dc.d1.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, false);
}
k.d = m;
}
if (j && this.dc != null) {
n = this.dc.dz.getHighlightingInfo(this, o, k.z, k.y, false);
k.b = n;
}
k.h = f;
this.aao(k);
this.xq.z(this, l, m, n, f, h, i, j, b < 0);
}
y7(a) {
return this.iv(a, this.xh);
}
ke(a, b) {
return this.kf(a, b, this.xh, runOn(this, this.y7), new FinancialValueList(this.yd, this.yb, this.yc, this.ya, this.yf));
}
kc(a, b) {
return this.kd(a, b, this.xh, runOn(this, this.y7), new FinancialValueList(this.yd, this.yb, this.yc, this.ya, this.yf));
}
ir(a, b, c, d, e) {
if (c == null) {
return Number.POSITIVE_INFINITY;
}
let f = this.xh.o5;
return this.is(a, b, this.xh, d, e, f, runOn(this, this.y7));
}
getOffsetValue() {
return this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
}
getCategoryWidth() {
return this.xh.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
}
wn(a, b, c) {
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, null, null, null);
}
i8(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.y8(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(new FinancialValueList(this.yd, this.yb, this.yc, this.ya, this.yf), a, this.xh, f, e, runOn(this, this.y7), b, c);
}
i4(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.y8(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.yb, a, this.xh, f, e, runOn(this, this.y7), b, c);
}
i6(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.y8(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.yc, a, this.xh, f, e, runOn(this, this.y7), b, c);
}
y9(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.y8(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.ya, a, this.xh, f, e, runOn(this, this.y7), b, c);
}
za(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.y8(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.yd, a, this.xh, f, e, runOn(this, this.y7), b, c);
}
zb(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.y8(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.yf, a, this.xh, f, e, runOn(this, this.y7), b, c);
}
wj(a, b, c) {
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.i4), (d, e) => this.kf(d, e, this.xh, runOn(this, this.y7), this.yb), (d, e) => this.kd(d, e, this.xh, runOn(this, this.y7), this.yb));
}
wl(a, b, c) {
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.i6), (d, e) => this.kf(d, e, this.xh, runOn(this, this.y7), this.yc), (d, e) => this.kd(d, e, this.xh, runOn(this, this.y7), this.yc));
}
aa9(a, b, c) {
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.za), (d, e) => this.kf(d, e, this.xh, runOn(this, this.y7), this.yd), (d, e) => this.kd(d, e, this.xh, runOn(this, this.y7), this.yd));
}
aa8(a, b, c) {
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.y9), (d, e) => this.kf(d, e, this.xh, runOn(this, this.y7), this.ya), (d, e) => this.kd(d, e, this.xh, runOn(this, this.y7), this.ya));
}
aba(a, b, c) {
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.zb), (d, e) => this.kf(d, e, this.xh, runOn(this, this.y7), this.yf), (d, e) => this.kd(d, e, this.xh, runOn(this, this.y7), this.yf));
}
qh() {
super.qh();
if (this.xh != null) {
this.xh.k3(false);
}
if (this.x0 != null) {
this.x0.k3(false);
}
}
s0(a, b) {
this.xy.cd.e(this.ie);
this.rz(false);
}
sz(a, b) {
if (this.g2 && this.ju < 0.05) {
this.g3 = true;
this.g6 = false;
this.gl = false;
}
this.xy.cd.e(this.ie);
this.rz(false);
}
ye(a, b, c) {
let d = this.dl(b);
this.ys.addItem(d, b);
this.yt.addItem(b, c);
return d;
}
aag(a, b) {
if (b == null) {
return;
}
a.deregisterColumn(b);
let c = this.ys.item(b);
this.yt.removeItem(c);
this.ys.removeItem(b);
}
rh(a, b, c, d) {
super.rh(a, b, c, d);
switch (b) {
case "SyncLink":
if (this.c4 != null && this.dc != null) {
this.xy.cd.e(this.ie);
this.rz(false);
}
break;
case "SeriesViewer":
if (c != null && d == null) {
if (this.xh != null) {
this.xh.cq(this);
}
if (this.x0 != null) {
this.x0.cq(this);
}
}
if (c == null && d != null) {
if (this.xh != null) {
this.xh.du(this);
}
if (this.x0 != null) {
this.x0.du(this);
}
}
this.xy.cd.e(this.ie);
this.rz(false);
break;
case "FastItemsSource":
this.yh = true;
if (typeCast(IFastItemsSource_$type, c) != null) {
this.aag(typeCast(IFastItemsSource_$type, c), this.yd);
this.aag(typeCast(IFastItemsSource_$type, c), this.yb);
this.aag(typeCast(IFastItemsSource_$type, c), this.yc);
this.aag(typeCast(IFastItemsSource_$type, c), this.ya);
this.aag(typeCast(IFastItemsSource_$type, c), this.yf);
this.yd = null;
this.yb = null;
this.yc = null;
this.ya = null;
this.yf = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
if (stringIsNullOrEmpty(this.z7) == false) {
this.yd = this.ye(typeCast(IFastItemsSource_$type, d), this.z7, "OpenColumn");
}
if (stringIsNullOrEmpty(this.zy) == false) {
this.yb = this.ye(typeCast(IFastItemsSource_$type, d), this.zy, "HighColumn");
}
if (stringIsNullOrEmpty(this.z3) == false) {
this.yc = this.ye(typeCast(IFastItemsSource_$type, d), this.z3, "LowColumn");
}
if (stringIsNullOrEmpty(this.zl) == false) {
this.ya = this.ye(typeCast(IFastItemsSource_$type, d), this.zl, "CloseColumn");
}
if (stringIsNullOrEmpty(this.aab) == false) {
this.yf = this.ye(typeCast(IFastItemsSource_$type, d), this.aab, "VolumeColumn");
}
}
this.yh = false;
if (this.x0 != null && !this.x0.d2()) {
this.xy.cd.e(this.ie);
this.rz(this.gh && c != null);
}
break;
case FinancialSeries.$$p[11]:
if (this.dp != null) {
this.aag(this.dp, this.yd);
this.yd = this.ye(this.dp, this.z7, "OpenColumn");
}
break;
case "OpenColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[1]:
if (this.dp != null) {
this.aag(this.dp, this.yb);
this.yb = this.ye(this.dp, this.zy, "HighColumn");
}
break;
case "HighColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[9]:
if (this.dp != null) {
this.aag(this.dp, this.yc);
this.yc = this.ye(this.dp, this.z3, "LowColumn");
}
break;
case "LowColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[0]:
if (this.dp != null) {
this.aag(this.dp, this.ya);
this.ya = this.ye(this.dp, this.zl, "CloseColumn");
}
break;
case "CloseColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
this.aaq();
break;
case FinancialSeries.$$p[13]:
if (this.dp != null) {
this.aag(this.dp, this.yf);
this.yf = this.ye(this.dp, this.aab, "VolumeColumn");
}
break;
case "VolumeColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[14]:
if (c != null) {
c.cq(this);
}
if (d != null) {
d.du(this);
}
this.xy.cd.e(this.ie);
this.rz(false);
this.qs();
this.xz = typeCast(ITimeRangeSelectorAxis_$type, this.xh);
break;
case FinancialSeries.$$p[15]:
if (c != null) {
c.cq(this);
}
if (d != null) {
d.du(this);
}
this.xy.cd.e(this.ie);
if (this.x0 != null) {
this.x0.d2();
}
{
this.rz(false);
}
this.qs();
break;
case "TransitionProgress":
this.xn.c(this.ju, this.xl, this.xj);
if (this.d7(this.cw)) {
return;
}
if (this.ju == 1) {
this.xj.y();
this.aap(this.xj, this.xy);
if (this.g2) {
this.g2 = false;
this.pc();
this.dd.r = truncate(this.jc());
this.dd.b = this.de;
}
if (this.g5) {
this.g5 = false;
this.pc();
this.dd.r = truncate(this.jc());
this.dd.b = this.de;
this.q7();
}
this.qv();
}
else {
this.aap(this.xn, this.xy);
}
if (this.dc != null) {
this.dc.r0(this);
}
break;
case FinancialSeries.$$p[10]:
this.rz(false);
break;
case "IsCustomCategoryStyleAllowed":
this.yi = this.yl();
this.rz(false);
break;
case "CategoryMode":
if (this.xh != null) {
this.xh.pw(true);
}
break;
}
}
yk(a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
}
yj(a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.dc) {
return true;
}
return false;
}
xa(a, b, c) {
if (b < a || a < 0 || a > this.dp.count || b < 0 || b > this.dp.count || c == null) {
return null;
}
let d = new Array((b - a) + 1);
let e = c.dm;
let f = null;
if (e) {
f = c.i$b;
}
for (let g = a; g <= b; g++) {
let h = g;
if (e) {
h = f._inner[h];
}
d[g - a] = this.dp.item(g);
}
return d;
}
ze(a) {
return a.cd.b;
}
zg(a) {
return a.cd.c;
}
w9(a, b) {
return this.xa(a, b, this.x0);
}
get_ff() {
return true;
}
o9() {
super.o9();
this.x4 = null;
}
dh(a, b, c) {
if (this.ef && this.f0(this.by) && !c) {
let d = this.x3(a, b, this.x4);
this.x4 = d;
return d;
}
else {
let e = this.x2(a, b, this.x4);
this.x4 = e;
return e;
}
}
zi(a) {
let b = this.xk();
let c = this.cw.b9;
let d = this.cw.ca;
let e = this.xh;
let f = 0;
if (e.dq) {
let g = (a.y - d.top) / d.height;
f = g * c.height + c.top;
}
else {
let h = (a.x - d.left) / d.width;
f = h * c.width + c.left;
}
let i = b.h.count;
let j = 0;
for (j = 0; j < i; j++) {
let k = b.h._inner[j];
let l = null;
if (j < i - 1) {
l = b.h._inner[j + 1];
}
if (k[0] <= f && l == null || l[0] >= f) {
if (l != null) {
if (Math.abs(k[0] - f) < Math.abs(l[0] - f)) {
return j;
}
else {
return j + 1;
}
}
else {
return j;
}
}
}
return j;
}
x3(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.dp.count;
let e = this.xy.cd.c;
let f = this.xy.cd.d;
let g = this.xy.cd.b;
let h = this.xh;
let i = -1;
let j = -1;
if (h.dm) {
let k = this.xk();
let l = this.zi(b);
if (k.o != null && l >= 0 && l < k.o.count) {
l = truncate(Math.round(k.o._inner[l]));
}
i = l;
j = l;
}
else {
let m = this.j7(b);
i = truncate(Math.floor((intDivide(m, g)))) * g;
j = i + (g - 1);
}
if (c != null && c.g == i && c.f == j) {
return c;
}
let n = new HighlightingInfo();
n.i = this;
n.g = i;
n.f = j;
return n;
}
x2(a, b, c) {
let d = new HighlightingInfo();
d.i = this;
d.g = 0;
d.f = this.dp.count - 1;
d.c = true;
if (c != null && c.g == d.g && c.f == d.f) {
return c;
}
return d;
}
yl() {
return this.yn;
}
it(a) {
let b = this.cw.ca;
let c = this.cw.b9;
let d = -1;
if (!b.isEmpty && !c.isEmpty && this.xh != null) {
let e = this.getEffectiveViewport1(this.cw);
let f = new ScalerParams(0, b, c, this.xh.df, e);
let g = this.wu(this.cw);
let h = this.xh.fw(g.left, f);
let i = this.xh.fw(g.right, f);
let j = (a.x - b.left) / b.width;
let k = h + (j * (i - h));
if (this.xh.categoryMode != 0) {
k -= 0.5;
}
d = k;
}
return d;
}
j7(a) {
return truncate(Math.round(this.it(a)));
}
get_ft() {
return typeCast(ISortingAxis_$type, this.xh) !== null;
}
a0() {
return this.xh;
}
j9(a) {
let b = this.cw.ca;
let c = this.cw.b9;
let d = this.getEffectiveViewport1(this.cw);
if (b.isEmpty || c.isEmpty) {
return -1;
}
let e = new Rect(0, 0, 0, 1, 1);
let f = new ScalerParams(0, b, c, this.xh.df, d);
let g = typeCast(ISortingAxis_$type, this.xh);
let h = this.wu(this.cw);
let i = h.left;
let j = h.right;
let k = this.wi(a).x;
let l = this.xh.fw(k, f);
let m = this.xh.fw(i, f);
let n = this.xh.fw(j, f);
l = Math.max(m, Math.min(n, l));
let o = g.i$f(l);
return o;
}
kr(a) {
let b = 0;
if (typeCast(ISortingAxis_$type, this.xh) !== null) {
b = this.j9(a);
if (b == -1) {
return null;
}
}
else {
b = this.j7(a);
}
return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
}
xk() {
let a = this.xj;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.xn;
}
return a;
}
y8(a, b, c) {
if (this.xh == null) {
return 0;
}
return this.xh.ov(a, b, c, this.index);
}
go() {
return this.yo;
}
xr() {
return 11;
}
c5() {
return 3;
}
c8() {
return 3;
}
aap(a, b) {
this.q4();
this.wt = a.ad;
b.a6();
}
aan(a, b) {
a.x();
}
hf(a, b, c) {
let d = super.hf(a, b, c);
let e = c;
if (this.dp == null || this.dp.count == 0 || !c.r() || b.isEmpty || a.isEmpty || this.xh == null || this.x0 == null || e.cd.b < 1 || this.xh.b0 == null || this.x0.b0 == null || this.x0.pr == this.x0.pq || this.xh.itemsSource == null || this.xh.o5 < 1) {
e.cd.b = 0;
d = false;
}
return d;
}
getViewInfo(a, b) {
b = this.cw.ca;
a = this.cw.b9;
return {
p0: a,
p1: b
};
}
zc(a) {
let b = 0;
let c = a.ca;
let d = a.b9;
let e = this.getEffectiveViewport1(this.cw);
if (!c.isEmpty && !d.isEmpty && this.x0 != null) {
let f = new ScalerParams(0, c, d, this.x0.df, e);
f.b = this.i0();
b = this.x0.ft(this.x0.p5, f);
}
return b;
}
pc() {
super.pc();
this.xl.y();
this.xj.y();
this.xn.y();
}
r0(a) {
super.r0(a);
this.xy.cd.e(this.ie);
if (this.d7(this.cw)) {
return;
}
if (this.gs) {
if (this.d4()) {
this.aap(this.xn, this.xy);
}
else {
this.aap(this.xj, this.xy);
}
return;
}
if (this.gg(a)) {
let b = this.xl;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.xl = this.xn;
this.xn = b;
}
else {
this.xl = this.xj;
this.xj = b;
}
this.aan(this.xj, this.xy);
let c = false;
if (this.g4) {
this.dd.w();
this.dd.r = truncate(this.jd());
this.dd.b = this.df != null ? this.df : this.de;
if (this.g5) {
let d = this.xn;
this.xn = this.xl;
this.xl = d;
c = true;
}
this.xt.x(this, this.xl, this.xj, this.isVertical, this.xh, this.x0, this.xs, this.xr(), this.c6, this.c5(), () => this.zc(this.xy), this.xy.b9);
if (this.g5) {
let e = this.xn;
this.xn = this.xl;
this.xl = e;
}
this.g5 = false;
}
if (this.g7) {
this.dd.w();
this.dd.r = truncate(this.je());
this.dd.b = this.dg != null ? this.dg : this.de;
if (this.g2) {
let f = this.xn;
this.xn = this.xl;
this.xl = f;
c = true;
}
this.xt.x(this, this.xl, this.xj, this.isVertical, this.xh, this.x0, this.xs, this.xr(), this.c6, this.c5(), () => this.zc(this.xy), this.xy.b9);
let g = this.xj;
this.xj = this.xl;
this.xl = g;
if (this.g2) {
let h = this.xn;
this.xn = this.xl;
this.xl = h;
}
this.g2 = false;
}
this.eb = false;
if (!c) {
this.o7();
}
this.sg();
if (this.g4) {
this.g3 = false;
this.g6 = false;
this.gl = false;
this.g2 = true;
}
if (this.g7) {
this.g6 = false;
this.g5 = true;
}
}
else {
this.aan(this.xj, this.xy);
this.aap(this.xj, this.xy);
}
}
gp() {
return true;
}
yq(a) {
for (let b of fromEnum(a)) {
switch (b) {
case "HighColumn":
if (this.yb == null) {
return false;
}
break;
case "LowColumn":
if (this.yc == null) {
return false;
}
break;
case "OpenColumn":
if (this.yd == null) {
return false;
}
break;
case "CloseColumn":
if (this.ya == null) {
return false;
}
break;
case "VolumeColumn":
if (this.yf == null) {
return false;
}
break;
}
}
return true;
}
get yr() {
return this.xh != null && typeCast(ISortingAxis_$type, this.xh) !== null;
}
ym() {
return this.typical != null;
}
aaf(a) {
this.typical(this, a);
}
get yz() {
return this.yw();
}
*_yw() {
let a = false;
if (this.ym()) {
let b = this.xu(0, this.dp.count);
this.aaf(new FinancialEventArgs(0, this.dp.count, b, this.xv(b), this));
if (b.typicalColumn != null) {
a = true;
for (let c of fromEnum(b.typicalColumn)) {
yield c;
}
}
}
if (!a) {
if (this.yr && this.xh.i$b != null) {
let d = this.dp.count;
let e = this.xh.i$b;
for (let f = 0; f < d; ++f) {
yield (this.yb.item(e.item(f)) + this.yc.item(e.item(f)) + this.ya.item(e.item(f))) / 3;
}
}
else {
let g = this.dp.count;
for (let h = 0; h < g; ++h) {
yield (this.yb.item(h) + this.yc.item(h) + this.ya.item(h)) / 3;
}
}
}
}
yw() {
return toEnum(() => this._yw());
}
get yy() {
return this.yv();
}
*_yv() {
if (this.yr && this.xh.i$b != null) {
let a = this.yb.count;
let b = this.xh.i$b;
if (a > 0) {
yield this.zd(this.yb.item(b.item(0)) - this.yc.item(b.item(0)));
}
for (let c = 1; c < a; ++c) {
yield Math.max(this.zd(this.yb.item(b.item(c)) - this.yc.item(b.item(c))), Math.max(this.zd(Math.abs(this.yb.item(b.item(c)) - this.ya.item(b.item(c - 1)))), this.zd(Math.abs(this.yc.item(b.item(c)) - this.ya.item(b.item(c - 1))))));
}
}
else {
let d = this.yb.count;
if (d > 0) {
yield this.zd(this.yb.item(0) - this.yc.item(0));
}
for (let e = 1;