igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,402 lines • 74.8 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.im;
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.xt == null) {
this.b = 0;
return;
}
let e = (this.a.cf.xt != null) ? this.a.cf.xt.dn : false;
let f = new ScalerParams(0, b, c, e, d);
let g = this.a.cf.w6(this.a);
let h = typeCast(ISortingAxis_$type, this.a.cf.xt);
if (h == null || h.i$b == null) {
let i = Math.floor(this.a.cf.xt.ga(g.left, f));
let j = Math.ceil(this.a.cf.xt.ga(g.right, f));
if (this.a.cf.xt.dn) {
j = Math.ceil(this.a.cf.xt.ga(g.left, f));
i = Math.floor(this.a.cf.xt.ga(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 {
h1() {
let a = super.h1();
{
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.aaw));
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.aau));
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.aav));
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.aat));
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.aax));
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.sk));
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.sk));
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.sk));
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.sk));
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;
}
aaw(a, b) {
if (this.z6 != null) {
b.value = this.z6;
return;
}
b.value = this.aaj;
}
aau(a, b) {
if (this.z2 != null) {
b.value = this.z2;
return;
}
b.value = this.aaa;
}
aav(a, b) {
if (this.z4 != null) {
b.value = this.z4;
return;
}
b.value = this.aaf;
}
aat(a, b) {
if (this.z0 != null) {
b.value = this.z0;
return;
}
b.value = this.zx;
}
aax(a, b) {
if (this.z8 != null) {
b.value = this.z8;
return;
}
b.value = this.aan;
}
k6() {
if (this.d4()) {
return this.bo.xz;
}
else {
return this.bo.xv;
}
}
rj(a) {
super.rj(a);
this.ya = a;
}
get_fa() {
return true;
}
ai() {
return [this.xt, this.yc];
}
k1(a, b) {
let c = this.nq(b);
if (c == FinancialSeries.$$p[11]) {
return this.k2(a, b, this.aaj);
}
if (c == FinancialSeries.$$p[1]) {
return this.k2(a, b, this.aaa);
}
if (c == FinancialSeries.$$p[9]) {
return this.k2(a, b, this.aaf);
}
if (c == FinancialSeries.$$p[0]) {
return this.k2(a, b, this.zx);
}
if (c == FinancialSeries.$$p[13]) {
return this.k2(a, b, this.aan);
}
if (c == FinancialSeries.$$p[5]) {
return this.k2(a, b, this.z6);
}
if (c == FinancialSeries.$$p[3]) {
return this.k2(a, b, this.z2);
}
if (c == FinancialSeries.$$p[4]) {
return this.k2(a, b, this.z4);
}
if (c == FinancialSeries.$$p[2]) {
return this.k2(a, b, this.z0);
}
if (c == FinancialSeries.$$p[6]) {
return this.k2(a, b, this.z8);
}
return super.k1(a, b);
}
mq(a) {
let b = this.nq(a);
if (b == FinancialSeries.$$p[11]) {
return this.aaj;
}
if (b == FinancialSeries.$$p[1]) {
return this.aaa;
}
if (b == FinancialSeries.$$p[9]) {
return this.aaf;
}
if (b == FinancialSeries.$$p[0]) {
return this.zx;
}
if (b == FinancialSeries.$$p[13]) {
return this.aan;
}
if (b == FinancialSeries.$$p[5]) {
return this.z6;
}
if (b == FinancialSeries.$$p[3]) {
return this.z2;
}
if (b == FinancialSeries.$$p[4]) {
return this.z4;
}
if (b == FinancialSeries.$$p[2]) {
return this.z0;
}
if (b == FinancialSeries.$$p[6]) {
return this.z8;
}
return super.mq(a);
}
zt() {
return 2;
}
zr() {
return 4;
}
aj(a) {
let b = this.an(this.xt, this.xv.k, this.zq(this.cw), this.zs(this.cw), this.w4(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.zt();
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.xt, this.xv.k, this.zq(this.cw), this.zs(this.cw), this.w4(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.yk = null;
this.yi = null;
this.yj = null;
this.yh = null;
this.yl = null;
this.yu = false;
this.assigningCategoryStyle = null;
this.x2 = null;
this.y4 = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
this.y5 = new Dictionary$2(String_$type, String_$type, 0);
this.yt = false;
this.yg = null;
this.xx = null;
this.xz = null;
this.xv = null;
this.x5 = null;
this.typical = null;
this.typicalBasedOn = null;
this.ys = false;
this.zh = null;
this.zf = null;
this.zg = null;
this.ze = null;
this.zi = null;
this.xy = null;
this.xu = null;
this.x0 = 0;
this.yb = null;
this.yd = null;
this.x2 = new CategorySeriesRenderManager();
this.yu = false;
this.x5 = new CategoryTransitionSourceFramePreparer();
this.xy = new CategoryFrame(3);
this.ab = FinancialSeries.$;
this.x1 = 0;
}
wi() {
return this.abj;
}
wj() {
return this.abj;
}
ph() {
super.ph();
this.xt = null;
this.yc = null;
}
get_em() {
return true;
}
get_gc() {
return this.yc != null && this.yc.dn;
}
get yp() {
return this.yk;
}
set yp(a) {
if (this.yk != a) {
let b = this.yk;
this.yk = a;
this.raisePropertyChanged("OpenColumn", b, this.yk);
}
}
get yn() {
return this.yi;
}
set yn(a) {
if (this.yi != a) {
let b = this.yi;
this.yi = a;
this.raisePropertyChanged("HighColumn", b, this.yi);
}
}
get yo() {
return this.yj;
}
set yo(a) {
if (this.yj != a) {
let b = this.yj;
this.yj = a;
this.raisePropertyChanged("LowColumn", b, this.yj);
}
}
get ym() {
return this.yh;
}
set ym(a) {
if (this.yh != a) {
let b = this.yh;
this.yh = a;
this.raisePropertyChanged("CloseColumn", b, this.yh);
}
}
get yr() {
return this.yl;
}
set yr(a) {
if (this.yl != a) {
let b = this.yl;
this.yl = a;
this.raisePropertyChanged("VolumeColumn", b, this.yl);
}
}
gj() {
return this.highlightedItemsSource != null || (this.z6 != null && this.z2 != null && this.z4 != null && this.z0 != null);
}
y1() {
return (this.assigningCategoryStyle != null && this.yu) || this.by != 1 || this.cq != 1 || this.cp != 1;
}
aa0(a) {
if (this.assigningCategoryStyle != null && this.yu) {
this.assigningCategoryStyle(this, a);
}
}
aay(a, b, c, d, e, f, g) {
let h = this.by != 1;
let i = this.cq != 1;
let j = this.cp != 1;
this.x2.a3(this.x2.b, d.dw, a, b, c, d, e, f, false, g);
this.x2.ab(this.ik);
let k = this.x2.ay;
let l = null;
let m = null;
let n = null;
let o = this.dp;
if (h && this.dc != null) {
l = this.dc.d7.getHighlightingInfo(this, o, k.z, k.y, false);
k.c = l;
}
if (i && this.dc != null) {
m = this.dc.d8.getHighlightingInfo(this, o, k.z, k.y, false);
if (m == null && this.bo != null) {
m = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, false);
}
k.d = m;
}
if (j && this.dc != null) {
n = this.dc.d6.getHighlightingInfo(this, o, k.z, k.y, false);
k.b = n;
}
k.h = f;
this.aa0(k);
this.x2.z(this, l, m, n, f, h, i, j, b < 0);
}
zj(a) {
return this.i2(a, this.xt);
}
kl(a, b) {
return this.km(a, b, this.xt, runOn(this, this.zj), new FinancialValueList(this.yp, this.yn, this.yo, this.ym, this.yr));
}
kj(a, b) {
return this.kk(a, b, this.xt, runOn(this, this.zj), new FinancialValueList(this.yp, this.yn, this.yo, this.ym, this.yr));
}
iy(a, b, c, d, e) {
if (c == null) {
return Number.POSITIVE_INFINITY;
}
let f = this.xt.qd;
return this.iz(a, b, this.xt, d, e, f, runOn(this, this.zj));
}
getOffsetValue() {
return this.zk(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
}
getCategoryWidth() {
return this.xt.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
}
wy(a, b, c) {
return this.w0(a, b, c, this.zk(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yc, this.xt, null, null, null);
}
jf(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.zk(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xt.dn, d);
return this.jh(new FinancialValueList(this.yp, this.yn, this.yo, this.ym, this.yr), a, this.xt, f, e, runOn(this, this.zj), b, c);
}
jb(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.zk(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xt.dn, d);
return this.jh(this.yn, a, this.xt, f, e, runOn(this, this.zj), b, c);
}
jd(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.zk(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xt.dn, d);
return this.jh(this.yo, a, this.xt, f, e, runOn(this, this.zj), b, c);
}
zl(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.zk(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xt.dn, d);
return this.jh(this.ym, a, this.xt, f, e, runOn(this, this.zj), b, c);
}
zm(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.zk(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xt.dn, d);
return this.jh(this.yp, a, this.xt, f, e, runOn(this, this.zj), b, c);
}
zn(a, b, c) {
let d = this.getEffectiveViewport1(this.cw);
let e = this.zk(this.cw.ca, this.cw.b9, d);
let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xt.dn, d);
return this.jh(this.yr, a, this.xt, f, e, runOn(this, this.zj), b, c);
}
wu(a, b, c) {
return this.w0(a, b, c, this.zk(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yc, this.xt, runOn(this, this.jb), (d, e) => this.km(d, e, this.xt, runOn(this, this.zj), this.yn), (d, e) => this.kk(d, e, this.xt, runOn(this, this.zj), this.yn));
}
ww(a, b, c) {
return this.w0(a, b, c, this.zk(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yc, this.xt, runOn(this, this.jd), (d, e) => this.km(d, e, this.xt, runOn(this, this.zj), this.yo), (d, e) => this.kk(d, e, this.xt, runOn(this, this.zj), this.yo));
}
abl(a, b, c) {
return this.w0(a, b, c, this.zk(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yc, this.xt, runOn(this, this.zm), (d, e) => this.km(d, e, this.xt, runOn(this, this.zj), this.yp), (d, e) => this.kk(d, e, this.xt, runOn(this, this.zj), this.yp));
}
abk(a, b, c) {
return this.w0(a, b, c, this.zk(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yc, this.xt, runOn(this, this.zl), (d, e) => this.km(d, e, this.xt, runOn(this, this.zj), this.ym), (d, e) => this.kk(d, e, this.xt, runOn(this, this.zj), this.ym));
}
abm(a, b, c) {
return this.w0(a, b, c, this.zk(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yc, this.xt, runOn(this, this.zn), (d, e) => this.km(d, e, this.xt, runOn(this, this.zj), this.yr), (d, e) => this.kk(d, e, this.xt, runOn(this, this.zj), this.yr));
}
qr() {
super.qr();
if (this.xt != null) {
this.xt.l0(false);
}
if (this.yc != null) {
this.yc.l0(false);
}
}
tb(a, b) {
this.ya.cd.e(this.im);
this.sa(false);
}
ta(a, b) {
if (this.g9 && this.j1 < 0.05) {
this.ha = true;
this.hd = false;
this.gs = false;
}
this.ya.cd.e(this.im);
this.sa(false);
}
yq(a, b, c) {
let d = this.dl(b);
this.y4.addItem(d, b);
this.y5.addItem(b, c);
return d;
}
aas(a, b) {
if (b == null) {
return;
}
a.deregisterColumn(b);
let c = this.y4.item(b);
this.y5.removeItem(c);
this.y4.removeItem(b);
}
rs(a, b, c, d) {
super.rs(a, b, c, d);
switch (b) {
case "SyncLink":
if (this.c4 != null && this.dc != null) {
this.ya.cd.e(this.im);
this.sa(false);
}
break;
case "SeriesViewer":
if (c != null && d == null) {
if (this.xt != null) {
this.xt.cx(this);
}
if (this.yc != null) {
this.yc.cx(this);
}
}
if (c == null && d != null) {
if (this.xt != null) {
this.xt.d4(this);
}
if (this.yc != null) {
this.yc.d4(this);
}
}
this.ya.cd.e(this.im);
this.sa(false);
break;
case "FastItemsSource":
this.yt = true;
if (typeCast(IFastItemsSource_$type, c) != null) {
this.aas(typeCast(IFastItemsSource_$type, c), this.yp);
this.aas(typeCast(IFastItemsSource_$type, c), this.yn);
this.aas(typeCast(IFastItemsSource_$type, c), this.yo);
this.aas(typeCast(IFastItemsSource_$type, c), this.ym);
this.aas(typeCast(IFastItemsSource_$type, c), this.yr);
this.yp = null;
this.yn = null;
this.yo = null;
this.ym = null;
this.yr = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
if (stringIsNullOrEmpty(this.aaj) == false) {
this.yp = this.yq(typeCast(IFastItemsSource_$type, d), this.aaj, "OpenColumn");
}
if (stringIsNullOrEmpty(this.aaa) == false) {
this.yn = this.yq(typeCast(IFastItemsSource_$type, d), this.aaa, "HighColumn");
}
if (stringIsNullOrEmpty(this.aaf) == false) {
this.yo = this.yq(typeCast(IFastItemsSource_$type, d), this.aaf, "LowColumn");
}
if (stringIsNullOrEmpty(this.zx) == false) {
this.ym = this.yq(typeCast(IFastItemsSource_$type, d), this.zx, "CloseColumn");
}
if (stringIsNullOrEmpty(this.aan) == false) {
this.yr = this.yq(typeCast(IFastItemsSource_$type, d), this.aan, "VolumeColumn");
}
}
this.yt = false;
if (this.yc != null && !this.yc.ee()) {
this.ya.cd.e(this.im);
this.sa(this.go && c != null);
}
break;
case FinancialSeries.$$p[11]:
if (this.dp != null) {
this.aas(this.dp, this.yp);
this.yp = this.yq(this.dp, this.aaj, "OpenColumn");
}
break;
case "OpenColumn":
if (this.yc != null && !this.yc.ee() && !this.yt) {
this.ya.cd.e(this.im);
this.sa(this.go && this.d9);
}
break;
case FinancialSeries.$$p[1]:
if (this.dp != null) {
this.aas(this.dp, this.yn);
this.yn = this.yq(this.dp, this.aaa, "HighColumn");
}
break;
case "HighColumn":
if (this.yc != null && !this.yc.ee() && !this.yt) {
this.ya.cd.e(this.im);
this.sa(this.go && this.d9);
}
break;
case FinancialSeries.$$p[9]:
if (this.dp != null) {
this.aas(this.dp, this.yo);
this.yo = this.yq(this.dp, this.aaf, "LowColumn");
}
break;
case "LowColumn":
if (this.yc != null && !this.yc.ee() && !this.yt) {
this.ya.cd.e(this.im);
this.sa(this.go && this.d9);
}
break;
case FinancialSeries.$$p[0]:
if (this.dp != null) {
this.aas(this.dp, this.ym);
this.ym = this.yq(this.dp, this.zx, "CloseColumn");
}
break;
case "CloseColumn":
if (this.yc != null && !this.yc.ee() && !this.yt) {
this.ya.cd.e(this.im);
this.sa(this.go && this.d9);
}
this.aa2();
break;
case FinancialSeries.$$p[13]:
if (this.dp != null) {
this.aas(this.dp, this.yr);
this.yr = this.yq(this.dp, this.aan, "VolumeColumn");
}
break;
case "VolumeColumn":
if (this.yc != null && !this.yc.ee() && !this.yt) {
this.ya.cd.e(this.im);
this.sa(this.go && this.d9);
}
break;
case FinancialSeries.$$p[14]:
if (c != null) {
c.cx(this);
}
if (d != null) {
d.d4(this);
}
this.ya.cd.e(this.im);
this.sa(false);
this.q2();
this.yb = typeCast(ITimeRangeSelectorAxis_$type, this.xt);
break;
case FinancialSeries.$$p[15]:
if (c != null) {
c.cx(this);
}
if (d != null) {
d.d4(this);
}
this.ya.cd.e(this.im);
if (this.yc != null) {
this.yc.ee();
}
{
this.sa(false);
}
this.q2();
break;
case "TransitionProgress":
this.xz.d(this.j1, this.xx, this.xv);
if (this.d7(this.cw)) {
return;
}
if (this.j1 == 1) {
this.xv.ab();
this.aa1(this.xv, this.ya);
if (this.g9) {
this.g9 = false;
this.pl();
this.dd.r = truncate(this.jj());
this.dd.b = this.de;
}
if (this.hc) {
this.hc = false;
this.pl();
this.dd.r = truncate(this.jj());
this.dd.b = this.de;
this.ri();
}
this.q5();
}
else {
this.aa1(this.xz, this.ya);
}
if (this.dc != null) {
this.dc.sv(this);
}
break;
case FinancialSeries.$$p[10]:
this.sa(false);
break;
case "IsCustomCategoryStyleAllowed":
this.yu = this.yx();
this.sa(false);
break;
case "CategoryMode":
if (this.xt != null) {
this.xt.q5(true);
}
break;
}
}
yw(a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
}
yv(a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.dj) {
return true;
}
return false;
}
xm(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.dw;
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;
}
zq(a) {
return a.cd.b;
}
zs(a) {
return a.cd.c;
}
xl(a, b) {
return this.xm(a, b, this.yc);
}
get_fh() {
return true;
}
pi() {
super.pi();
this.yg = null;
}
dh(a, b, c) {
if (this.ef && this.f3(this.by) && !c) {
let d = this.yf(a, b, this.yg);
this.yg = d;
return d;
}
else {
let e = this.ye(a, b, this.yg);
this.yg = e;
return e;
}
}
zu(a) {
let b = this.xw();
let c = this.cw.b9;
let d = this.cw.ca;
let e = this.xt;
let f = 0;
if (e.dz) {
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.k.count;
let j = 0;
for (j = 0; j < i; j++) {
let k = b.k._inner[j];
let l = null;
if (j < i - 1) {
l = b.k._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;
}
yf(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.dp.count;
let e = this.ya.cd.c;
let f = this.ya.cd.d;
let g = this.ya.cd.b;
if (g == 0) {
return null;
}
let h = this.xt;
let i = -1;
let j = -1;
if (h.dw) {
let k = this.xw();
let l = this.zu(b);
if (k.r != null && l >= 0 && l < k.r.count) {
l = truncate(Math.round(k.r._inner[l]));
}
i = l;
j = l;
}
else {
let m = this.ke(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;
}
ye(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;
}
yx() {
return this.yz;
}
i0(a) {
let b = this.cw.ca;
let c = this.cw.b9;
let d = -1;
if (!b.isEmpty && !c.isEmpty && this.xt != null) {
let e = this.getEffectiveViewport1(this.cw);
let f = new ScalerParams(0, b, c, this.xt.dn, e);
let g = this.w6(this.cw);
let h = this.xt.ga(g.left, f);
let i = this.xt.ga(g.right, f);
let j = (a.x - b.left) / b.width;
let k = h + (j * (i - h));
if (this.xt.categoryMode != 0) {
k -= 0.5;
}
d = k;
}
return d;
}
ke(a) {
return truncate(Math.round(this.i0(a)));
}
get_fw() {
return typeCast(ISortingAxis_$type, this.xt) !== null;
}
a0() {
return this.xt;
}
kg(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.xt.dn, d);
let g = typeCast(ISortingAxis_$type, this.xt);
let h = this.w6(this.cw);
let i = h.left;
let j = h.right;
let k = this.wt(a).x;
let l = this.xt.ga(k, f);
let m = this.xt.ga(i, f);
let n = this.xt.ga(j, f);
l = Math.max(m, Math.min(n, l));
let o = g.i$f(l);
return o;
}
ky(a) {
let b = 0;
if (typeCast(ISortingAxis_$type, this.xt) !== null) {
b = this.kg(a);
if (b == -1) {
return null;
}
}
else {
b = this.ke(a);
}
return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
}
xw() {
let a = this.xv;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.xz;
}
return a;
}
zk(a, b, c) {
if (this.xt == null) {
return 0;
}
return this.xt.p3(a, b, c, this.index);
}
gv() {
return this.y0;
}
x3() {
return 11;
}
c5() {
return 3;
}
c8() {
return 3;
}
aa1(a, b) {
this.rf();
this.w5 = a.ag;
b.a6();
}
aaz(a, b) {
a.aa();
}
hm(a, b, c) {
let d = super.hm(a, b, c);
let e = c;
if (this.dp == null || this.dp.count == 0 || !c.r() || b.isEmpty || a.isEmpty || this.xt == null || this.yc == null || e.cd.b < 1 || this.xt.b7 == null || this.yc.b7 == null || this.yc.qy == this.yc.qx || this.xt.itemsSource == null || this.xt.qd < 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
};
}
zo(a) {
let b = 0;
let c = a.ca;
let d = a.b9;
let e = this.getEffectiveViewport1(this.cw);
if (!c.isEmpty && !d.isEmpty && this.yc != null) {
let f = new ScalerParams(0, c, d, this.yc.dn, e);
f.b = this.i7();
b = this.yc.f7(this.yc.rd, f);
}
return b;
}
pl() {
super.pl();
this.xx.ab();
this.xv.ab();
this.xz.ab();
}
sb(a) {
super.sb(a);
this.ya.cd.e(this.im);
if (this.d7(this.cw)) {
return;
}
if (this.gz) {
if (this.d4()) {
this.aa1(this.xz, this.ya);
}
else {
this.aa1(this.xv, this.ya);
}
return;
}
if (this.gn(a)) {
let b = this.xx;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.xx = this.xz;
this.xz = b;
}
else {
this.xx = this.xv;
this.xv = b;
}
this.aaz(this.xv, this.ya);
let c = false;
if (this.hb) {
this.dd.w();
this.dd.r = truncate(this.jk());
this.dd.b = this.df != null ? this.df : this.de;
if (this.hc) {
let d = this.xz;
this.xz = this.xx;
this.xx = d;
c = true;
}
this.x5.x(this, this.xx, this.xv, this.isVertical, this.xt, this.yc, this.x4, this.x3(), this.c6, this.c5(), () => this.zo(this.ya), this.ya.b9);
if (this.hc) {
let e = this.xz;
this.xz = this.xx;
this.xx = e;
}
this.hc = false;
}
if (this.he) {
this.dd.w();
this.dd.r = truncate(this.jl());
this.dd.b = this.dg != null ? this.dg : this.de;
if (this.g9) {
let f = this.xz;
this.xz = this.xx;
this.xx = f;
c = true;
}
this.x5.x(this, this.xx, this.xv, this.isVertical, this.xt, this.yc, this.x4, this.x3(), this.c6, this.c5(), () => this.zo(this.ya), this.ya.b9);
let g = this.xv;
this.xv = this.xx;
this.xx = g;
if (this.g9) {
let h = this.xz;
this.xz = this.xx;
this.xx = h;
}
this.g9 = false;
}
this.eb = false;
if (!c) {
this.pg();
}
this.sr();
if (this.hb) {
this.ha = false;
this.hd = false;
this.gs = false;
this.g9 = true;
}
if (this.he) {
this.hd = false;
this.hc = true;
}
}
else {
this.aaz(this.xv, this.ya);
this.aa1(this.xv, this.ya);
}
}
gw() {
return true;
}
y2(a) {
for (let b of fromEnum(a)) {
switch (b) {
case "HighColumn":
if (this.yn == null) {
return false;
}
break;
case "LowColumn":
if (this.yo == null) {
return false;
}
break;
case "OpenColumn":
if (this.yp == null) {
return false;
}
break;
case "CloseColumn":
if (this.ym == null) {
return false;
}
break;
case "VolumeColumn":
if (this.yr == null) {
return false;
}
break;
}
}
return true;
}
get y3() {
return this.xt != null && typeCast(ISortingAxis_$type, this.xt) !== null;
}
yy() {
return this.typical != null;
}
aar(a) {
this.typical(this, a);
}
get zb() {
return this.y8();
}
*_y8() {
let a = false;
if (this.yy()) {
let b = this.x6(0, this.dp.count);
this.aar(new FinancialEventArgs(0, this.dp.count, b, this.x7(b), this));
if (b.typicalColumn != null) {
a = true;
for (let c of fromEnum(b.typicalColumn)) {
yield c;
}
}
}
if (!a) {
if (this.y3 && this.xt.i$b != null) {
let d = this.dp.count;
let e = this.xt.i$b;
for (let f = 0; f < d; ++f) {
yield (this.yn.item(e.item(f)) + this.yo.item(e.item(f)) + this.ym.item(e.item(f))) / 3;
}
}
else {
let g = this.dp.count;
for (let h = 0; h < g; ++h) {
yield (this.yn.item(h) + this.yo.item(h) + this.ym.item(h)) / 3;
}
}
}
}
y8() {
return toEnum(() => this._y8());
}
get za() {
return this.y7();
}
*_y7() {
if (this.y3 && this.xt.i$b != null) {
let a = this.yn.count;
let b = this.xt.i$b;
if (a > 0) {
yield this.zp(this.yn.item(b.item(0)) - this.yo.item(b.item(0)));
}
for (let c = 1; c < a; ++c) {
yield Math.max(this.zp(this.yn.item(b.item(c)) - this.yo.item(b.item(c))), Math.max(this.zp(Math.abs(this.yn.item(b.item(c)) - this.ym.item(b.item(c - 1)))), this.zp(Math.abs(this.yo.item(b.item(c)) - this.ym.item(b.item(c - 1))))));
}
}
else {
let d = this.yn.count;
if (d > 0) {
yield t