igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
1,368 lines (1,367 loc) • 76.5 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-angular-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-angular-core";
import { IFastItemColumn$1_$type } from "igniteui-angular-core";
import { Series } from "./Series";
import { Rect } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-angular-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "igniteui-angular-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-angular-core";
import { List$1 } from "igniteui-angular-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { Dictionary$2 } from "igniteui-angular-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-angular-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-angular-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-angular-core";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
import { dateToStringFormat } from "igniteui-angular-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-angular-core";
import { Color } from "igniteui-angular-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 = 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.b2.ic;
return {
p0: a,
p1: b,
p2: c,
p3: d
};
}
e(a) {
let b = this.a.by;
let c = this.a.bx;
let d = this.a.bx;
if (this.a.b2 != null) {
d = this.a.b2.getEffectiveViewport1(this.a);
}
if (b.isEmpty || c.isEmpty || this.a.b2.w5 == null) {
this.b = 0;
return;
}
let e = (this.a.b2.w5 != null) ? this.a.b2.w5.ch : false;
let f = new ScalerParams(0, b, c, e, d);
let g = this.a.b2.wi(this.a);
let h = typeCast(ISortingAxis_$type, this.a.b2.w5);
if (h == null || h.i$b == null) {
let i = Math.floor(this.a.b2.w5.eo(g.left, f));
let j = Math.ceil(this.a.b2.w5.eo(g.right, f));
if (this.a.b2.w5.ch) {
j = Math.ceil(this.a.b2.w5.eo(g.left, f));
i = Math.floor(this.a.b2.w5.eo(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 = markType(FinancialBucketCalculator, 'FinancialBucketCalculator', Base.$, [IBucketizer_$type]);
return FinancialBucketCalculator;
})();
/**
* @hidden
*/
export let FinancialSeries = /*@__PURE__*/ (() => {
class FinancialSeries extends Series {
constructor() {
super();
this.xw = null;
this.xu = null;
this.xv = null;
this.xt = null;
this.xx = null;
this.x6 = false;
this.assigningCategoryStyle = null;
this.xe = null;
this.yg = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
this.yh = new Dictionary$2(String_$type, String_$type, 0);
this.x5 = false;
this.xs = null;
this.w9 = null;
this.xb = null;
this.w7 = null;
this.xh = null;
this.typical = null;
this.typicalBasedOn = null;
this.x4 = false;
this.yt = null;
this.yr = null;
this.ys = null;
this.yq = null;
this.yu = null;
this.xa = null;
this.w6 = null;
this.xc = 0;
this.xn = null;
this.xp = null;
this.xe = new CategorySeriesRenderManager();
this.x6 = false;
this.xh = new CategoryTransitionSourceFramePreparer();
this.xa = new CategoryFrame(3);
this.ab = FinancialSeries.$;
this.xd = 0;
}
hs() {
let a = super.hs();
{
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.z8));
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.z6));
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.z7));
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.z5));
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.z9));
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.rz));
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.rz));
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.rz));
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.rz));
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;
}
z8(a, b) {
if (this.zi != null) {
b.value = this.zi;
return;
}
b.value = this.zv;
}
z6(a, b) {
if (this.ze != null) {
b.value = this.ze;
return;
}
b.value = this.zm;
}
z7(a, b) {
if (this.zg != null) {
b.value = this.zg;
return;
}
b.value = this.zr;
}
z5(a, b) {
if (this.zc != null) {
b.value = this.zc;
return;
}
b.value = this.y9;
}
z9(a, b) {
if (this.zk != null) {
b.value = this.zk;
return;
}
b.value = this.zz;
}
ku() {
if (this.d3()) {
return this.bn.xb;
}
else {
return this.bn.w7;
}
}
q0(a) {
super.q0(a);
this.xm = a;
}
get_e6() {
return true;
}
ai() {
return [this.w5, this.xo];
}
kp(a, b) {
let c = this.nc(b);
if (c == FinancialSeries.$$p[11]) {
return this.kq(a, b, this.zv);
}
if (c == FinancialSeries.$$p[1]) {
return this.kq(a, b, this.zm);
}
if (c == FinancialSeries.$$p[9]) {
return this.kq(a, b, this.zr);
}
if (c == FinancialSeries.$$p[0]) {
return this.kq(a, b, this.y9);
}
if (c == FinancialSeries.$$p[13]) {
return this.kq(a, b, this.zz);
}
if (c == FinancialSeries.$$p[5]) {
return this.kq(a, b, this.zi);
}
if (c == FinancialSeries.$$p[3]) {
return this.kq(a, b, this.ze);
}
if (c == FinancialSeries.$$p[4]) {
return this.kq(a, b, this.zg);
}
if (c == FinancialSeries.$$p[2]) {
return this.kq(a, b, this.zc);
}
if (c == FinancialSeries.$$p[6]) {
return this.kq(a, b, this.zk);
}
return super.kp(a, b);
}
mc(a) {
let b = this.nc(a);
if (b == FinancialSeries.$$p[11]) {
return this.zv;
}
if (b == FinancialSeries.$$p[1]) {
return this.zm;
}
if (b == FinancialSeries.$$p[9]) {
return this.zr;
}
if (b == FinancialSeries.$$p[0]) {
return this.y9;
}
if (b == FinancialSeries.$$p[13]) {
return this.zz;
}
if (b == FinancialSeries.$$p[5]) {
return this.zi;
}
if (b == FinancialSeries.$$p[3]) {
return this.ze;
}
if (b == FinancialSeries.$$p[4]) {
return this.zg;
}
if (b == FinancialSeries.$$p[2]) {
return this.zc;
}
if (b == FinancialSeries.$$p[6]) {
return this.zk;
}
return super.mc(a);
}
y5() {
return 2;
}
y3() {
return 4;
}
aj(a) {
let b = this.an(this.w5, this.w7.f, this.y2(this.cv), this.y4(this.cv), this.wg(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.y5();
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.w5, this.w7.f, this.y2(this.cv), this.y4(this.cv), this.wg(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;
}
vv() {
return this.aav;
}
vw() {
return this.aav;
}
o1() {
super.o1();
this.w5 = null;
this.xo = null;
}
get_ek() {
return true;
}
get_f4() {
return this.xo != null && this.xo.ch;
}
get x1() {
return this.xw;
}
set x1(a) {
if (this.xw != a) {
let b = this.xw;
this.xw = a;
this.raisePropertyChanged("OpenColumn", b, this.xw);
}
}
get xz() {
return this.xu;
}
set xz(a) {
if (this.xu != a) {
let b = this.xu;
this.xu = a;
this.raisePropertyChanged("HighColumn", b, this.xu);
}
}
get x0() {
return this.xv;
}
set x0(a) {
if (this.xv != a) {
let b = this.xv;
this.xv = a;
this.raisePropertyChanged("LowColumn", b, this.xv);
}
}
get xy() {
return this.xt;
}
set xy(a) {
if (this.xt != a) {
let b = this.xt;
this.xt = a;
this.raisePropertyChanged("CloseColumn", b, this.xt);
}
}
get x3() {
return this.xx;
}
set x3(a) {
if (this.xx != a) {
let b = this.xx;
this.xx = a;
this.raisePropertyChanged("VolumeColumn", b, this.xx);
}
}
ga() {
return this.highlightedItemsSource != null || (this.zi != null && this.ze != null && this.zg != null && this.zc != null);
}
yd() {
return (this.assigningCategoryStyle != null && this.x6) || this.bx != 1 || this.cp != 1 || this.co != 1;
}
aac(a) {
if (this.assigningCategoryStyle != null && this.x6) {
this.assigningCategoryStyle(this, a);
}
}
aaa(a, b, c, d, e, f, g) {
let h = this.bx != 1;
let i = this.cp != 1;
let j = this.co != 1;
this.xe.a3(this.xe.b, d.cn, a, b, c, d, e, f, false, g);
this.xe.ab(this.ia);
let k = this.xe.ay;
let l = null;
let m = null;
let n = null;
let o = this.dn;
if (h && this.db != null) {
l = this.db.dl.getHighlightingInfo(this, o, k.z, k.y, false);
k.c = l;
}
if (i && this.db != null) {
m = this.db.dm.getHighlightingInfo(this, o, k.z, k.y, false);
if (m == null && this.bn != null) {
m = this.db.dm.getHighlightingInfo(this.bn, this.bn.dn, k.z, k.y, false);
}
k.d = m;
}
if (j && this.db != null) {
n = this.db.dk.getHighlightingInfo(this, o, k.z, k.y, false);
k.b = n;
}
k.h = f;
this.aac(k);
this.xe.z(this, l, m, n, f, h, i, j, b < 0);
}
yv(a) {
return this.is(a, this.w5);
}
j9(a, b) {
return this.ka(a, b, this.w5, runOn(this, this.yv), new FinancialValueList(this.x1, this.xz, this.x0, this.xy, this.x3));
}
j7(a, b) {
return this.j8(a, b, this.w5, runOn(this, this.yv), new FinancialValueList(this.x1, this.xz, this.x0, this.xy, this.x3));
}
io(a, b, c, d, e) {
if (c == null) {
return Number.POSITIVE_INFINITY;
}
let f = this.w5.lj;
return this.ip(a, b, this.w5, d, e, f, runOn(this, this.yv));
}
getOffsetValue() {
return this.yw(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv));
}
getCategoryWidth() {
return this.w5.getCategorySize(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv));
}
wb(a, b, c) {
return this.wd(a, b, c, this.yw(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.xo, this.w5, null, null, null);
}
i4(a, b, c) {
let d = this.getEffectiveViewport1(this.cv);
let e = this.yw(this.cv.by, this.cv.bx, d);
let f = new ScalerParams(0, this.cv.by, this.cv.bx, this.w5.ch, d);
return this.i6(new FinancialValueList(this.x1, this.xz, this.x0, this.xy, this.x3), a, this.w5, f, e, runOn(this, this.yv), b, c);
}
i0(a, b, c) {
let d = this.getEffectiveViewport1(this.cv);
let e = this.yw(this.cv.by, this.cv.bx, d);
let f = new ScalerParams(0, this.cv.by, this.cv.bx, this.w5.ch, d);
return this.i6(this.xz, a, this.w5, f, e, runOn(this, this.yv), b, c);
}
i2(a, b, c) {
let d = this.getEffectiveViewport1(this.cv);
let e = this.yw(this.cv.by, this.cv.bx, d);
let f = new ScalerParams(0, this.cv.by, this.cv.bx, this.w5.ch, d);
return this.i6(this.x0, a, this.w5, f, e, runOn(this, this.yv), b, c);
}
yx(a, b, c) {
let d = this.getEffectiveViewport1(this.cv);
let e = this.yw(this.cv.by, this.cv.bx, d);
let f = new ScalerParams(0, this.cv.by, this.cv.bx, this.w5.ch, d);
return this.i6(this.xy, a, this.w5, f, e, runOn(this, this.yv), b, c);
}
yy(a, b, c) {
let d = this.getEffectiveViewport1(this.cv);
let e = this.yw(this.cv.by, this.cv.bx, d);
let f = new ScalerParams(0, this.cv.by, this.cv.bx, this.w5.ch, d);
return this.i6(this.x1, a, this.w5, f, e, runOn(this, this.yv), b, c);
}
yz(a, b, c) {
let d = this.getEffectiveViewport1(this.cv);
let e = this.yw(this.cv.by, this.cv.bx, d);
let f = new ScalerParams(0, this.cv.by, this.cv.bx, this.w5.ch, d);
return this.i6(this.x3, a, this.w5, f, e, runOn(this, this.yv), b, c);
}
v7(a, b, c) {
return this.wd(a, b, c, this.yw(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.xo, this.w5, runOn(this, this.i0), (d, e) => this.ka(d, e, this.w5, runOn(this, this.yv), this.xz), (d, e) => this.j8(d, e, this.w5, runOn(this, this.yv), this.xz));
}
v9(a, b, c) {
return this.wd(a, b, c, this.yw(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.xo, this.w5, runOn(this, this.i2), (d, e) => this.ka(d, e, this.w5, runOn(this, this.yv), this.x0), (d, e) => this.j8(d, e, this.w5, runOn(this, this.yv), this.x0));
}
aax(a, b, c) {
return this.wd(a, b, c, this.yw(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.xo, this.w5, runOn(this, this.yy), (d, e) => this.ka(d, e, this.w5, runOn(this, this.yv), this.x1), (d, e) => this.j8(d, e, this.w5, runOn(this, this.yv), this.x1));
}
aaw(a, b, c) {
return this.wd(a, b, c, this.yw(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.xo, this.w5, runOn(this, this.yx), (d, e) => this.ka(d, e, this.w5, runOn(this, this.yv), this.xy), (d, e) => this.j8(d, e, this.w5, runOn(this, this.yv), this.xy));
}
aay(a, b, c) {
return this.wd(a, b, c, this.yw(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.xo, this.w5, runOn(this, this.yz), (d, e) => this.ka(d, e, this.w5, runOn(this, this.yv), this.x3), (d, e) => this.j8(d, e, this.w5, runOn(this, this.yv), this.x3));
}
qa() {
super.qa();
if (this.w5 != null) {
this.w5.ib(false);
}
if (this.xo != null) {
this.xo.ib(false);
}
}
sq(a, b) {
this.xm.b0.e(this.ic);
this.rq(false);
}
sp(a, b) {
if (this.g0 && this.jp < 0.05) {
this.g1 = true;
this.g4 = false;
this.gj = false;
}
this.xm.b0.e(this.ic);
this.rq(false);
}
x2(a, b, c) {
let d = this.dk(b);
this.yg.addItem(d, b);
this.yh.addItem(b, c);
return d;
}
z4(a, b) {
if (b == null) {
return;
}
a.deregisterColumn(b);
let c = this.yg.item(b);
this.yh.removeItem(c);
this.yg.removeItem(b);
}
q8(a, b, c, d) {
super.q8(a, b, c, d);
switch (b) {
case "SyncLink":
if (this.c3 != null && this.db != null) {
this.xm.b0.e(this.ic);
this.rq(false);
}
break;
case "SeriesViewer":
if (c != null && d == null) {
if (this.w5 != null) {
this.w5.b0(this);
}
if (this.xo != null) {
this.xo.b0(this);
}
}
if (c == null && d != null) {
if (this.w5 != null) {
this.w5.ct(this);
}
if (this.xo != null) {
this.xo.ct(this);
}
}
this.xm.b0.e(this.ic);
this.rq(false);
break;
case "FastItemsSource":
this.x5 = true;
if (typeCast(IFastItemsSource_$type, c) != null) {
this.z4(typeCast(IFastItemsSource_$type, c), this.x1);
this.z4(typeCast(IFastItemsSource_$type, c), this.xz);
this.z4(typeCast(IFastItemsSource_$type, c), this.x0);
this.z4(typeCast(IFastItemsSource_$type, c), this.xy);
this.z4(typeCast(IFastItemsSource_$type, c), this.x3);
this.x1 = null;
this.xz = null;
this.x0 = null;
this.xy = null;
this.x3 = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
if (stringIsNullOrEmpty(this.zv) == false) {
this.x1 = this.x2(typeCast(IFastItemsSource_$type, d), this.zv, "OpenColumn");
}
if (stringIsNullOrEmpty(this.zm) == false) {
this.xz = this.x2(typeCast(IFastItemsSource_$type, d), this.zm, "HighColumn");
}
if (stringIsNullOrEmpty(this.zr) == false) {
this.x0 = this.x2(typeCast(IFastItemsSource_$type, d), this.zr, "LowColumn");
}
if (stringIsNullOrEmpty(this.y9) == false) {
this.xy = this.x2(typeCast(IFastItemsSource_$type, d), this.y9, "CloseColumn");
}
if (stringIsNullOrEmpty(this.zz) == false) {
this.x3 = this.x2(typeCast(IFastItemsSource_$type, d), this.zz, "VolumeColumn");
}
}
this.x5 = false;
if (this.xo != null && !this.xo.c1()) {
this.xm.b0.e(this.ic);
this.rq(this.gf && c != null);
}
break;
case FinancialSeries.$$p[11]:
if (this.dn != null) {
this.z4(this.dn, this.x1);
this.x1 = this.x2(this.dn, this.zv, "OpenColumn");
}
break;
case "OpenColumn":
if (this.xo != null && !this.xo.c1() && !this.x5) {
this.xm.b0.e(this.ic);
this.rq(this.gf && this.d7);
}
break;
case FinancialSeries.$$p[1]:
if (this.dn != null) {
this.z4(this.dn, this.xz);
this.xz = this.x2(this.dn, this.zm, "HighColumn");
}
break;
case "HighColumn":
if (this.xo != null && !this.xo.c1() && !this.x5) {
this.xm.b0.e(this.ic);
this.rq(this.gf && this.d7);
}
break;
case FinancialSeries.$$p[9]:
if (this.dn != null) {
this.z4(this.dn, this.x0);
this.x0 = this.x2(this.dn, this.zr, "LowColumn");
}
break;
case "LowColumn":
if (this.xo != null && !this.xo.c1() && !this.x5) {
this.xm.b0.e(this.ic);
this.rq(this.gf && this.d7);
}
break;
case FinancialSeries.$$p[0]:
if (this.dn != null) {
this.z4(this.dn, this.xy);
this.xy = this.x2(this.dn, this.y9, "CloseColumn");
}
break;
case "CloseColumn":
if (this.xo != null && !this.xo.c1() && !this.x5) {
this.xm.b0.e(this.ic);
this.rq(this.gf && this.d7);
}
this.aae();
break;
case FinancialSeries.$$p[13]:
if (this.dn != null) {
this.z4(this.dn, this.x3);
this.x3 = this.x2(this.dn, this.zz, "VolumeColumn");
}
break;
case "VolumeColumn":
if (this.xo != null && !this.xo.c1() && !this.x5) {
this.xm.b0.e(this.ic);
this.rq(this.gf && this.d7);
}
break;
case FinancialSeries.$$p[14]:
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
this.xm.b0.e(this.ic);
this.rq(false);
this.qk();
this.xn = typeCast(ITimeRangeSelectorAxis_$type, this.w5);
break;
case FinancialSeries.$$p[15]:
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
this.xm.b0.e(this.ic);
if (this.xo != null) {
this.xo.c1();
}
{
this.rq(false);
}
this.qk();
break;
case "TransitionProgress":
this.xb.c(this.jp, this.w9, this.w7);
if (this.d5(this.cv)) {
return;
}
if (this.jp == 1) {
this.w7.w();
this.aad(this.w7, this.xm);
if (this.g0) {
this.g0 = false;
this.o5();
this.dc.r = truncate(this.i8());
this.dc.b = this.dd;
}
if (this.g3) {
this.g3 = false;
this.o5();
this.dc.r = truncate(this.i8());
this.dc.b = this.dd;
this.qz();
}
this.qn();
}
else {
this.aad(this.xb, this.xm);
}
if (this.db != null) {
this.db.qo(this);
}
break;
case FinancialSeries.$$p[10]:
this.rq(false);
break;
case "IsCustomCategoryStyleAllowed":
this.x6 = this.x9();
this.rq(false);
break;
case "CategoryMode":
if (this.w5 != null) {
this.w5.ma(true);
}
break;
}
}
x8(a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
}
x7(a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.ce) {
return true;
}
return false;
}
wy(a, b, c) {
if (b < a || a < 0 || a > this.dn.count || b < 0 || b > this.dn.count || c == null) {
return null;
}
let d = new Array((b - a) + 1);
let e = c.cn;
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.dn.item(g);
}
return d;
}
y2(a) {
return a.b0.b;
}
y4(a) {
return a.b0.c;
}
wx(a, b) {
return this.wy(a, b, this.xo);
}
get_fd() {
return true;
}
o2() {
super.o2();
this.xs = null;
}
dg(a, b, c) {
if (this.ed && this.fy(this.bx) && !c) {
let d = this.xr(a, b, this.xs);
this.xs = d;
return d;
}
else {
let e = this.xq(a, b, this.xs);
this.xs = e;
return e;
}
}
y6(a) {
let b = this.w8();
let c = this.cv.bx;
let d = this.cv.by;
let e = this.w5;
let f = 0;
if (e.cp) {
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.f.count;
let j = 0;
for (j = 0; j < i; j++) {
let k = b.f._inner[j];
let l = null;
if (j < i - 1) {
l = b.f._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;
}
xr(a, b, c) {
if (this.dn == null) {
return null;
}
let d = this.dn.count;
let e = this.xm.b0.c;
let f = this.xm.b0.d;
let g = this.xm.b0.b;
let h = this.w5;
let i = -1;
let j = -1;
if (h.cn) {
let k = this.w8();
let l = this.y6(b);
if (k.m != null && l >= 0 && l < k.m.count) {
l = truncate(Math.round(k.m._inner[l]));
}
i = l;
j = l;
}
else {
let m = this.j2(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;
}
xq(a, b, c) {
let d = new HighlightingInfo();
d.i = this;
d.g = 0;
d.f = this.dn.count - 1;
d.c = true;
if (c != null && c.g == d.g && c.f == d.f) {
return c;
}
return d;
}
x9() {
return this.yb;
}
iq(a) {
let b = this.cv.by;
let c = this.cv.bx;
let d = -1;
if (!b.isEmpty && !c.isEmpty && this.w5 != null) {
let e = this.getEffectiveViewport1(this.cv);
let f = new ScalerParams(0, b, c, this.w5.ch, e);
let g = this.wi(this.cv);
let h = this.w5.eo(g.left, f);
let i = this.w5.eo(g.right, f);
let j = (a.x - b.left) / b.width;
let k = h + (j * (i - h));
if (this.w5.categoryMode != 0) {
k -= 0.5;
}
d = k;
}
return d;
}
j2(a) {
return truncate(Math.round(this.iq(a)));
}
get_fr() {
return typeCast(ISortingAxis_$type, this.w5) !== null;
}
a0() {
return this.w5;
}
j4(a) {
let b = this.cv.by;
let c = this.cv.bx;
let d = this.getEffectiveViewport1(this.cv);
if (b.isEmpty || c.isEmpty) {
return -1;
}
let e = new Rect(0, 0, 0, 1, 1);
let f = new ScalerParams(0, b, c, this.w5.ch, d);
let g = typeCast(ISortingAxis_$type, this.w5);
let h = this.wi(this.cv);
let i = h.left;
let j = h.right;
let k = this.v6(a).x;
let l = this.w5.eo(k, f);
let m = this.w5.eo(i, f);
let n = this.w5.eo(j, f);
l = Math.max(m, Math.min(n, l));
let o = g.i$f(l);
return o;
}
km(a) {
let b = 0;
if (typeCast(ISortingAxis_$type, this.w5) !== null) {
b = this.j4(a);
if (b == -1) {
return null;
}
}
else {
b = this.j2(a);
}
return b >= 0 && this.dn != null && b < this.dn.count ? this.dn.item(b) : null;
}
w8() {
let a = this.w7;
if (this.d3()) {
if (this.dc.g) {
this.dc.t();
}
a = this.xb;
}
return a;
}
yw(a, b, c) {
if (this.w5 == null) {
return 0;
}
return this.w5.k9(a, b, c, this.index);
}
gm() {
return this.yc;
}
xf() {
return 11;
}
c4() {
return 3;
}
c7() {
return 3;
}
aad(a, b) {
this.qw();
this.wh = a.ab;
b.aw();
}
aab(a, b) {
a.v();
}
hd(a, b, c) {
let d = super.hd(a, b, c);
let e = c;
if (this.dn == null || this.dn.count == 0 || !c.o() || b.isEmpty || a.isEmpty || this.w5 == null || this.xo == null || e.b0.b < 1 || this.w5.bi == null || this.xo.bi == null || this.xo.l4 == this.xo.l3 || this.w5.itemsSource == null || this.w5.lj < 1) {
e.b0.b = 0;
d = false;
}
return d;
}
getViewInfo(a, b) {
b = this.cv.by;
a = this.cv.bx;
return {
p0: a,
p1: b
};
}
y0(a) {
let b = 0;
let c = a.by;
let d = a.bx;
let e = this.getEffectiveViewport1(this.cv);
if (!c.isEmpty && !d.isEmpty && this.xo != null) {
let f = new ScalerParams(0, c, d, this.xo.ch, e);
f.b = this.ix();
b = this.xo.el(this.xo.me, f);
}
return b;
}
o5() {
super.o5();
this.w9.w();
this.w7.w();
this.xb.w();
}
rr(a) {
super.rr(a);
this.xm.b0.e(this.ic);
if (this.d5(this.cv)) {
return;
}
if (this.gq) {
if (this.d3()) {
this.aad(this.xb, this.xm);
}
else {
this.aad(this.w7, this.xm);
}
return;
}
if (this.ge(a)) {
let b = this.w9;
if (this.d3()) {
if (this.dc.g) {
this.dc.t();
}
this.w9 = this.xb;
this.xb = b;
}
else {
this.w9 = this.w7;
this.w7 = b;
}
this.aab(this.w7, this.xm);
let c = false;
if (this.g2) {
this.dc.w();
this.dc.r = truncate(this.i9());
this.dc.b = this.de != null ? this.de : this.dd;
if (this.g3) {
let d = this.xb;
this.xb = this.w9;
this.w9 = d;
c = true;
}
this.xh.s(this, this.w9, this.w7, this.isVertical, this.w5, this.xo, this.xg, this.xf(), this.c5, this.c4(), () => this.y0(this.xm), this.xm.bx);
if (this.g3) {
let e = this.xb;
this.xb = this.w9;
this.w9 = e;
}
this.g3 = false;
}
if (this.g5) {
this.dc.w();
this.dc.r = truncate(this.ja());
this.dc.b = this.df != null ? this.df : this.dd;
if (this.g0) {
let f = this.xb;
this.xb = this.w9;
this.w9 = f;
c = true;
}
this.xh.s(this, this.w9, this.w7, this.isVertical, this.w5, this.xo, this.xg, this.xf(), this.c5, this.c4(), () => this.y0(this.xm), this.xm.bx);
let g = this.w7;
this.w7 = this.w9;
this.w9 = g;
if (this.g0) {
let h = this.xb;
this.xb = this.w9;
this.w9 = h;
}
this.g0 = false;
}
this.d9 = false;
if (!c) {
this.o0();
}
this.r6();
if (this.g2) {
this.g1 = false;
this.g4 = false;
this.gj = false;
this.g0 = true;
}
if (this.g5) {
this.g4 = false;
this.g3 = true;
}
}
else {
this.aab(this.w7, this.xm);
this.aad(this.w7, this.xm);
}
}
gn() {
return true;
}
ye(a) {
for (let b of fromEnum(a)) {
switch (b) {
case "HighColumn":
if (this.xz == null) {
return false;
}
break;
case "LowColumn":
if (this.x0 == null) {
return false;
}
break;
case "OpenColumn":
if (this.x1 == null) {
return false;
}
break;
case "CloseColumn":
if (this.xy == null) {
return false;
}
break;
case "VolumeColumn":
if (this.x3 == null) {
return false;
}
break;
}
}
return true;
}
get yf() {
return this.w5 != null && typeCast(ISortingAxis_$type, this.w5) !== null;
}
ya() {
return this.typical != null;
}
z3(a) {
this.typical(this, a);
}
get yn() {
return this.yk();
}
*_yk() {
let a = false;
if (this.ya()) {
let b = this.xi(0, this.dn.count);
this.z3(new FinancialEventArgs(0, this.dn.count, b, this.xj(b), this));
if (b.typicalColumn != null) {
a = true;
for (let c of fromEnum(b.typicalColumn)) {
yield c;
}
}
}
if (!a) {
if (this.yf && this.w5.i$b != null) {
let d = this.dn.count;
let e = this.w5.i$b;
for (let f = 0; f < d; ++f) {