igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
904 lines (903 loc) • 32.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 { __extends } from "tslib";
import { FinancialSeries } from "./FinancialSeries";
import { ITrendLineSeries_$type } from "./ITrendLineSeries";
import { IndicatorDisplayType_$type } from "./IndicatorDisplayType";
import { DependencyProperty } from "igniteui-react-core";
import { TrendLineType_$type } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { PenLineCap_$type } from "igniteui-react-core";
import { DoubleCollection } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { AxisRange } from "./AxisRange";
import { CategoryFrame } from "./CategoryFrame";
import { Number_$type, typeCast, enumGetBox, EnumUtil, runOn, markType, markDep } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory";
import { FinancialSeriesView } from "./FinancialSeriesView";
import { FinancialBucketCalculator } from "./FinancialBucketCalculator";
import { TrendResolutionParams } from "./TrendResolutionParams";
import { CategorySeries } from "./CategorySeries";
import { NotImplementedException } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
import { PathGeometry } from "igniteui-react-core";
import { GeometryGroup } from "igniteui-react-core";
import { Pool$1 } from "igniteui-react-core";
import { LineGeometry } from "igniteui-react-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-react-core";
import { IndicatorRenderer } from "./IndicatorRenderer";
/**
* @hidden
*/
var FinancialIndicator = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FinancialIndicator, _super);
function FinancialIndicator() {
var _this = _super.call(this) || this;
_this._indicatorColumn = null;
_this.abb = null;
_this.xl = new CategoryFrame(3);
_this.xn = new CategoryFrame(3);
_this.xj = new CategoryFrame(3);
_this.indicatorColumn = new List$1(Number_$type, 0);
_this.abb = new AxisRange(-100, 100);
return _this;
}
FinancialIndicator.prototype.get_e9 = function () {
return true;
};
FinancialIndicator.prototype.ct = function () {
return new FinancialIndicatorView(this);
};
FinancialIndicator.prototype.q8 = function (a) {
_super.prototype.q8.call(this, a);
this.abc = a;
};
FinancialIndicator.prototype.abp = function (a) {
if (this.x0 != null && !this.x0.d2()) {
this.rz(true);
}
};
FinancialIndicator.prototype.abh = function (a, b, c) {
if (isNaN_(b.x) || isNaN_(b.y)) {
return false;
}
var d = this.x0;
var e = 0;
if (d != null) {
e = d.gg(d.p5);
}
if ((a.y >= e && a.y <= b.y) || (a.y <= e && a.y >= b.y)) {
return true;
}
return false;
};
FinancialIndicator.prototype.b3 = function () {
if (this.b4 == 0) {
return 1;
}
else {
return _super.prototype.b3.call(this);
}
};
FinancialIndicator.prototype.wy = function (a) {
if (this.xh == null || this.x0 == null) {
return Rect.empty;
}
var b = this.wi(a);
var c = this.cw.ca;
var d = this.cw.b9;
var e = this.getEffectiveViewport1(this.cw);
var f = new ScalerParams(0, c, d, this.x0.df, e);
f.b = this.i0();
var g = this.an(this.xh, this.xj.h, this.ze(this.cw), this.zg(this.cw), a, true);
if (g == null) {
return Rect.empty;
}
var h = g[0];
var i = g[1];
var j = Math.abs(b.x - h[0]);
var k = Math.abs(b.x - i[0]);
var l = this.x0.ft(this.x0.p5, f);
var m = 1;
if (j < k) {
var n = h[0] - 0.5 * m;
var o = h[1];
var p = l;
return new Rect(0, n, Math.min(o, p), m, Math.max(o, p) - Math.min(o, p));
}
else {
var q = i[0] - 0.5 * m;
var r = i[1];
var s = l;
return new Rect(0, q, Math.min(r, s), m, Math.max(r, s) - Math.min(r, s));
}
};
FinancialIndicator.prototype.gx = function (a, b) {
var c = this.wn(this.ws(a), true, false);
if (this.abe == 1) {
if (this.abh(a, c, b)) {
return true;
}
}
if (this.abe == 1 || this.abe == 0) {
if (this.gw(a, b)) {
return true;
}
}
if (this.abe == 2) {
if (this.g0(a, b)) {
return true;
}
}
return false;
};
FinancialIndicator.prototype.ph = function (a, b, c, d) {
_super.prototype.ph.call(this, a, b, c, d);
if (this.xh != null && typeCast(ISortingAxis_$type, this.xh) !== null) {
this.xh.i$i();
}
if (this.abc.cn) {
this.abc.cl.g$i(a, b, c, d);
}
if (d != null && this.yt.containsKey(d)) {
var e = this.yt.tryGetValue(d, d);
d = e.p1;
}
if (this.xh != null && typeCast(ISortingAxis_$type, this.xh) !== null) {
a = 4;
b = 0;
c = this.dp.count;
}
switch (a) {
case 3:
if (this.abg(b, c, d)) {
this.abr(b, c, d);
this.abp(true);
}
break;
case 2:
if (this.abg(b, this.dp.count - b, d)) {
this.abr(b, this.dp.count - b, d);
this.abp(true);
}
break;
case 1:
if (this.abg(b, this.dp.count - b, d)) {
var f = new Array(c);
for (var g = 0; g < c; g++) {
f[g] = 0;
}
this.indicatorColumn.s(b, f);
this.abr(b, this.dp.count - b, d);
this.abp(true);
}
break;
case 0:
if (this.abg(b, this.dp.count - b, d)) {
this.indicatorColumn.v(b, c);
this.abr(b, this.dp.count - b, d);
this.abp(true);
}
break;
case 4:
if (this.abg(b, this.dp.count - b, d)) {
this.indicatorColumn = new List$1(Number_$type, 2, this.dp.count);
var h = new Array(c);
for (var i = 0; i < c; i++) {
h[i] = 0;
}
this.indicatorColumn.s(0, h);
this.abr(b, this.dp.count - b, d);
this.abp(true);
}
break;
}
};
FinancialIndicator.prototype.get_abd = function () {
return 0;
};
Object.defineProperty(FinancialIndicator.prototype, "abd", {
get: function () {
return this.get_abd();
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialIndicator.prototype, "ab2", {
get: function () {
return this.c(FinancialIndicator.abs);
},
set: function (a) {
this.h(FinancialIndicator.abs, a);
},
enumerable: false,
configurable: true
});
FinancialIndicator.prototype.abm = function () {
return -1;
};
Object.defineProperty(FinancialIndicator.prototype, "indicatorColumn", {
get: function () {
return this._indicatorColumn;
},
set: function (a) {
this._indicatorColumn = a;
},
enumerable: false,
configurable: true
});
FinancialIndicator.prototype.rh = function (a, b, c, d) {
switch (b) {
case "XAxis":
this.abc.ct();
break;
case "TrendLineType":
var e = EnumUtil.getEnumValue(TrendLineType_$type, d);
if (e != 0) {
this.abc.cl = CategoryTrendLineManagerFactory.a(this.abc.cl, this.xh, this.s4, this, this.ds);
}
break;
}
_super.prototype.rh.call(this, a, b, c, d);
if (this.abc.cn && this.abc.cl.g$e(a, b, c, d)) {
this.rz(false);
var f = typeCast(FinancialIndicatorView.$, this.cv);
if (f != null && f.cn) {
f.cl.g$e(a, b, c, d);
}
this.qs();
}
switch (b) {
case "FastItemsSource":
if (this.dp != null) {
this.indicatorColumn = new List$1(Number_$type, 2, this.dp.count);
var g = new Array(this.dp.count);
for (var h = 0; h < this.dp.count; h++) {
g[h] = 0;
}
this.indicatorColumn.s(0, g);
this.abr(0, this.dp.count, null);
if (this.x0 != null && !this.x0.d2()) {
this.xy.cd.e(this.ie);
this.rz(this.gh && c != null);
}
}
break;
case "TrendLineBrush":
this.rn(b);
break;
case FinancialIndicator.$$p[0]:
this.pb(true, this.cw);
this.sr();
this.rz(false);
this.qs();
break;
case "OpenColumn":
case "HighColumn":
case "LowColumn":
case "CloseColumn":
case "VolumeColumn":
if (this.dp != null) {
if (this.indicatorColumn.count != this.dp.count) {
this.indicatorColumn = new List$1(Number_$type, 2, this.dp.count);
var i = new Array(this.dp.count);
for (var j = 0; j < this.dp.count; j++) {
i[j] = 0;
}
this.indicatorColumn.s(0, i);
}
if (this.abg(0, this.dp.count - 1, b)) {
this.abq();
}
}
break;
case "XAxis":
if (this.xh != null && (typeCast(ISortingAxis_$type, this.xh) !== null || typeCast(ISortingAxis_$type, c) !== null)) {
this.abq();
}
break;
case "YAxis":
case FinancialIndicator.$$p[1]:
this.abq();
this.qs();
break;
case "TrendLineType":
this.qs();
break;
}
};
FinancialIndicator.prototype.i8 = function (a, b, c) {
if (this.indicatorColumn == null) {
return _super.prototype.i8.call(this, a, b, c);
}
var d = this.getEffectiveViewport1(this.cw);
var e = this.y8(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
f.c = this.dc.x5;
return this.ja(this.indicatorColumn, a, this.xh, f, e, runOn(this, this.y7), b, c);
};
FinancialIndicator.prototype.ke = function (a, b) {
if (this.indicatorColumn == null) {
return _super.prototype.ke.call(this, a, b);
}
return this.kf(a, b, this.xh, runOn(this, this.y7), this.indicatorColumn);
};
FinancialIndicator.prototype.kc = function (a, b) {
if (this.indicatorColumn == null) {
return _super.prototype.kc.call(this, a, b);
}
return this.kd(a, b, this.xh, runOn(this, this.y7), this.indicatorColumn);
};
FinancialIndicator.prototype.get_he = function () {
return true;
};
FinancialIndicator.prototype.abg = function (a, b, c) {
if (c == null) {
return true;
}
if (this.abi(a, b).contains(c)) {
return true;
}
return false;
};
FinancialIndicator.prototype.abr = function (a, b, c) {
this.abf(a, b);
};
FinancialIndicator.prototype.ay = function (a) {
if (this.dp == null) {
return null;
}
if (a != null && a == this.x0) {
return this.abb;
}
return null;
};
FinancialIndicator.prototype.ge = function (a) {
var b = this.dp != null ? this.dp.indexOf(a) : -1;
var c = this.cw.ca;
c = c.copy();
var d = this.cw.b9;
var e = new Rect(0, 0, 0, 1, 1);
var f = this.ww(this.cw);
if (b >= 0 && Rect.l_op_Inequality(c, null) && Rect.l_op_Inequality(d, null)) {
if (this.xh != null) {
var g = new ScalerParams(0, e, e, this.xh.df, f);
var h = this.xh.ft(b, g);
if (h < c.left + 0.1 * c.width) {
h = h + 0.4 * c.width;
}
if (h > c.right - 0.1 * c.width) {
h = h - 0.4 * c.width;
}
c.x = h - 0.5 * c.width;
}
if (this.x0 != null && this.indicatorColumn != null && b < this.indicatorColumn.count) {
var i = new ScalerParams(0, e, e, this.x0.df, f);
i.b = this.i0();
var j = this.x0.ft(this.indicatorColumn._inner[b], i);
if (j < c.top + 0.1 * c.height) {
j = j + 0.4 * c.height;
}
if (j > c.bottom - 0.1 * c.height) {
j = j - 0.4 * c.height;
}
c.y = j - 0.5 * c.height;
}
this.c4.au(this.dc, c, true);
}
return b >= 0;
};
FinancialIndicator.prototype.hf = function (a, b, c) {
var d = _super.prototype.hf.call(this, a, b, c);
if (this.indicatorColumn == null || this.indicatorColumn.count == 0) {
d = false;
}
return d;
};
FinancialIndicator.prototype.aan = function (a, b) {
var _this = this;
_super.prototype.aan.call(this, a, b);
var c = b.ca;
var d = b.b9;
var e = this.getEffectiveViewport1(b);
var f = this.xh;
var g = this.x0;
var h = new ScalerParams(0, c, d, f.df, e);
var i = new ScalerParams(0, c, d, g.df, e);
i.b = this.i0();
var j = this.xh.ag();
var k = j[0];
var l = j[1];
a.h.clear();
a.p.clear();
a.s.clear();
var m = 0;
var n = typeCast(ISortingAxis_$type, this.xh);
if (n != null && n.i$b.count != this.dp.count) {
return;
}
m = this.y8(c, d, e);
var o = this.abm();
if (o == -1) {
o = this.trendLinePeriod;
}
var p = typeCast(FinancialIndicatorView.$, b);
if (p.cn) {
p.cl.prepareLineCore(a.s, this.trendLineType, this.indicatorColumn, o, function (q) { return _this.xh.ft(q, h); }, function (q) { return _this.x0.ft(q, i); }, ((function () {
var $ret = new TrendResolutionParams();
$ret.e = b.cd.b;
$ret.f = b.cd.c;
$ret.g = b.cd.d;
$ret.a = m;
$ret.d = _this.ie;
$ret.i = d;
$ret.j = c;
$ret.h = e;
$ret.b = l;
$ret.c = k;
return $ret;
})()));
}
var q = this.xh.fw(2, h) - this.xh.fw(1, h);
for (var r = b.cd.c; r <= b.cd.d; ++r) {
var s = void 0;
if (n == null) {
s = b.cd.getBucket(r);
}
else {
var t = n.i$b._inner[r];
var u = n.i$d(t);
var v = this.indicatorColumn._inner[r];
var w = v;
var x = u;
while (r < b.cd.d) {
t = n.i$b._inner[r + 1];
x = n.i$d(t);
if (x - u > q) {
break;
}
r++;
var y = this.indicatorColumn._inner[r];
v = Math.min(v, y);
w = Math.max(w, y);
}
var z = NaN;
if (!isNaN_(u)) {
z = this.xh.ft(u, h);
}
s = [z, v, w];
}
if (!isNaN_(s[0])) {
if (this.xh != null && typeCast(ISortingAxis_$type, this.xh) !== null) {
s[0] = s[0] + m;
}
else {
s[0] = f.ft(s[0], h) + m;
}
s[1] = g.ft(s[1], i);
if (b.cd.b > 1 || n != null) {
s[2] = g.ft(s[2], i);
}
else {
s[2] = s[1];
}
a.h.add(s);
}
}
return;
};
FinancialIndicator.prototype.pb = function (a, b) {
_super.prototype.pb.call(this, a, b);
var c = b;
c.co(a);
if (c.cn) {
c.cl.g$h();
}
};
FinancialIndicator.prototype.xr = function () {
switch (this.abe) {
case 1: return 1;
case 2: return 1;
case 0: return 12;
}
return 1;
};
FinancialIndicator.prototype.aap = function (a, b) {
_super.prototype.aap.call(this, a, b);
var c = typeCast(FinancialIndicatorView.$, b);
var d = function (e) { return a.h._inner[e][0]; };
var e = function (f) { return a.h._inner[f][1]; };
if (c.cn) {
c.cl.g$h();
c.cl.g$k(a.s);
}
var f = b.b9;
var g = this.getEffectiveViewport1(b);
var h = 0;
var i = this.vk;
var j = this.aa7;
if (b.cg(a)) {
c.co(false);
if (a.h.count > 0) {
switch (this.abe) {
case 0:
var k = CategorySeries.yy(a.h, a.h.count - 1, f, b.ca, false);
c.cs(a.h.count, d, e, true, k);
break;
case 1:
if (this.x0 != null) {
h = this.zc(b);
}
else {
h = 0.5 * (f.top + f.bottom);
}
var l = CategorySeries.yy(a.h, a.h.count - 1, f, b.ca, false);
c.cq(a.h.count, d, e, true, h, l);
break;
case 2:
h = this.zc(b);
c.cr(a.h.count, d, e, true, h);
break;
default: throw new NotImplementedException(0);
}
}
b.ci(a);
}
var m = a.h;
var n = this.dp.count;
this.xq.a2(this, this.yp(), runOn(this, this.w9), this.ze(b), this.zg(b));
var o = false;
var p = this.xq.b;
if (p != null) {
o = true;
}
this.xq.ak = i;
this.xq.ag = i;
if (o) {
var q = new ScalerParams(0, b.ca, b.b9, this.xh.df, g);
this.xq.f = false;
this.aam(m, -1, n, this.xh, q, b.t, -1);
}
this.xq.ad(c.da, true, false, true, false);
this.xq.ad(c.dc, true, false, true, false);
this.xq.ad(c.db, false, true, false, false);
c.db._opacity = 0.8 * this.xq.j * this.ia;
this.xq.ad(c.c9, true, false, false, false);
this.xq.ak = j;
this.xq.ag = j;
if (o) {
var r = new ScalerParams(0, b.ca, b.b9, this.xh.df, g);
this.xq.f = true;
this.aam(m, -1, n, this.xh, r, b.t, -1);
}
this.xq.ad(c.c6, true, false, true, false);
this.xq.ad(c.c8, true, false, true, false);
this.xq.ad(c.c7, false, true, false, false);
c.c7._opacity = 0.8 * this.xq.j * this.ia;
this.xq.ad(c.c5, true, false, false, false);
c.cu();
};
FinancialIndicator.prototype.sq = function () {
_super.prototype.sq.call(this);
if (this.index < 0) {
return;
}
if (this.abc.cn) {
this.abc.cv();
}
};
FinancialIndicator.prototype.abq = function () {
if (this.abc.cn) {
this.abc.cl.g$m();
}
this.abf(0, this.indicatorColumn.count);
if (this.x0 != null && !this.x0.d2()) {
this.rz(this.gh && this.d9);
}
};
FinancialIndicator.prototype.p5 = function (a) {
_super.prototype.p5.call(this, a);
this.bc.exportTrendlineData(this, a, this.abc.cl.g$n);
};
FinancialIndicator.prototype.bf = function (a) {
if (this.abe == 1 || this.abe == 2) {
return 3;
}
else if (this.abe == 0) {
return 2;
}
return a;
};
FinancialIndicator.prototype.qj = function () {
_super.prototype.qj.call(this);
if (this.abc.cn) {
this.abc.cl.g$m();
}
};
FinancialIndicator.$t = markType(FinancialIndicator, 'FinancialIndicator', FinancialSeries.$, [ITrendLineSeries_$type]);
FinancialIndicator.abs = DependencyProperty.i("ActualTrendLineBrush", Brush.$, FinancialIndicator.$, new PropertyMetadata(2, null, function (a, b) { return a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue); }));
FinancialIndicator.$$p = markDep(DependencyProperty, PropertyMetadata, FinancialIndicator, 'raisePropertyChanged', ['DisplayType:abe:abt', [IndicatorDisplayType_$type, enumGetBox(IndicatorDisplayType_$type, 0)], 'IgnoreFirst:abk:abu', [1, 0], 'TrendLineType::ab0', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness::abz', [1, 1.5], 'TrendLinePeriod::aby', [1, 7], 'TrendLineBrush::abv', [Brush.$, null], 'TrendLineZIndex:abl:ab1', [1, 1001], 'TrendLineDashArray:ab3:abw', [DoubleCollection.$], 'TrendLineDashCap:ab4:abx', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]);
return FinancialIndicator;
}(FinancialSeries));
export { FinancialIndicator };
/**
* @hidden
*/
var FinancialIndicatorBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FinancialIndicatorBucketCalculator, _super);
function FinancialIndicatorBucketCalculator(a) {
var _this = _super.call(this, a) || this;
_this.f = null;
_this.f = a;
return _this;
}
FinancialIndicatorBucketCalculator.prototype.getBucket = function (a) {
var b = a * this.b;
var c = Math.min(b + this.b - 1, this.f.cj.indicatorColumn.count - 1);
var d = NaN;
var e = NaN;
for (var f = b; f <= c; ++f) {
var g = this.f.cj.indicatorColumn._inner[f];
if (!isNaN_(d)) {
if (!isNaN_(g)) {
d = Math.min(d, g);
e = Math.max(e, g);
}
}
else {
d = g;
e = g;
}
}
if (!isNaN_(d)) {
return [0.5 * (b + c), d, e];
}
return [NaN, NaN, NaN];
};
FinancialIndicatorBucketCalculator.$t = markType(FinancialIndicatorBucketCalculator, 'FinancialIndicatorBucketCalculator', FinancialBucketCalculator.$);
return FinancialIndicatorBucketCalculator;
}(FinancialBucketCalculator));
export { FinancialIndicatorBucketCalculator };
/**
* @hidden
*/
var FinancialIndicatorView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FinancialIndicatorView, _super);
function FinancialIndicatorView(a) {
var _this = _super.call(this, a) || this;
_this.cj = null;
_this.cm = null;
_this.da = ((function () {
var $ret = new Path();
$ret.an = new PathGeometry();
return $ret;
})());
_this.c6 = ((function () {
var $ret = new Path();
$ret.an = new PathGeometry();
return $ret;
})());
_this.db = ((function () {
var $ret = new Path();
$ret.an = new PathGeometry();
return $ret;
})());
_this.c7 = ((function () {
var $ret = new Path();
$ret.an = new PathGeometry();
return $ret;
})());
_this.dc = ((function () {
var $ret = new Path();
$ret.an = new PathGeometry();
return $ret;
})());
_this.c8 = ((function () {
var $ret = new Path();
$ret.an = new PathGeometry();
return $ret;
})());
_this.c9 = ((function () {
var $ret = new Path();
$ret.an = new GeometryGroup();
return $ret;
})());
_this.c5 = ((function () {
var $ret = new Path();
$ret.an = new GeometryGroup();
return $ret;
})());
_this.ck = null;
_this.c2 = new Path();
_this.c4 = new Path();
_this.c3 = new Path();
_this.c1 = new Path();
_this.cy = new Path();
_this.c0 = new Path();
_this.cz = new Path();
_this.cx = new Path();
_this.cj = a;
_this.cm = ((function () {
var $ret = new Pool$1(LineGeometry.$);
$ret.create = runOn(_this, _this.cw);
$ret.destroy = runOn(_this, _this.cp);
return $ret;
})());
return _this;
}
FinancialIndicatorView.prototype.ce = function () {
return new FinancialIndicatorBucketCalculator(this);
};
FinancialIndicatorView.prototype.a4 = function () {
_super.prototype.a4.call(this);
if (!this.t) {
this.cj.aa7 = Defaults.financialSeries_NegativeBrush;
this.cj.abe = this.cj.abd;
}
};
FinancialIndicatorView.prototype.cw = function () {
return new LineGeometry();
};
FinancialIndicatorView.prototype.cp = function (a) {
};
Object.defineProperty(FinancialIndicatorView.prototype, "cl", {
get: function () {
if (this.ck == null) {
this.ck = CategoryTrendLineManagerFactory.a(this.ck, this.f.a0(), this.f.s4, this.f, this.f.ds);
}
return this.ck;
},
set: function (a) {
this.ck = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialIndicatorView.prototype, "cn", {
get: function () {
return this.ck != null;
},
enumerable: false,
configurable: true
});
FinancialIndicatorView.prototype.co = function (a) {
Extensions.e(this.da.an);
Extensions.e(this.db.an);
Extensions.e(this.dc.an);
Extensions.e(this.c6.an);
Extensions.e(this.c7.an);
Extensions.e(this.c8.an);
Extensions.d(this.c9.an);
Extensions.d(this.c5.an);
if (a) {
this.cm.count = 0;
}
this.a2();
};
FinancialIndicatorView.prototype.cu = function () {
};
FinancialIndicatorView.prototype.cs = function (a, b, c, d, e) {
IndicatorRenderer.g(a, b, c, d, this.ca, this.b9, this.da, this.c6, this.cd.b, this.f.ie, e);
this.a2();
};
FinancialIndicatorView.prototype.cq = function (a, b, c, d, e, f) {
IndicatorRenderer.e(a, b, c, d, this.ca, this.b9, this.da, this.db, this.c6, this.c7, e, this.cd.b, this.f.ie, f);
this.a2();
};
FinancialIndicatorView.prototype.cr = function (a, b, c, d, e) {
IndicatorRenderer.f(a, b, c, d, this.b9, e, this.cm, this.c9, this.c5);
this.a2();
};
FinancialIndicatorView.prototype.cv = function () {
this.cj.ab2 = null;
if (this.cj.trendLineBrush != null) {
this.cj.ab2 = this.cj.trendLineBrush;
}
else {
this.cj.ab2 = this.cj.vk;
}
};
FinancialIndicatorView.prototype.bq = function () {
_super.prototype.bq.call(this);
var a = this.b3();
this.c2.an = this.da.an;
this.c4.an = this.dc.an;
this.c3.an = this.db.an;
this.c1.an = this.c9.an;
this.cy.an = this.c6.an;
this.c0.an = this.c8.an;
this.cz.an = this.c7.an;
this.cx.an = this.c5.an;
this.c2._stroke = a;
this.c4._stroke = a;
this.c2.ad = this.f.ig + 3;
this.c4.ad = this.f.ig + 3;
this.c3._fill = a;
this.c3._opacity = 1;
this.c1._stroke = a;
this.c1.ad = this.f.ig + 3;
this.cy._stroke = a;
this.c0._stroke = a;
this.cy.ad = this.f.ig + 3;
this.c0.ad = this.f.ig + 3;
this.cz._fill = a;
this.cz._opacity = 1;
this.cx._stroke = a;
this.cx.ad = this.f.ig + 3;
};
FinancialIndicatorView.prototype.bj = function (a, b) {
_super.prototype.bj.call(this, a, b);
if (a.d) {
if (b) {
if (this.cj.abe == 2) {
a.t(this.c1);
a.t(this.cx);
}
else {
a.t(this.c3);
a.t(this.c2);
a.t(this.c4);
a.t(this.cz);
a.t(this.cy);
a.t(this.c0);
}
}
else {
if (this.cj.abe == 2) {
a.t(this.c9);
a.t(this.c5);
}
else {
a.t(this.db);
a.t(this.da);
a.t(this.dc);
a.t(this.c7);
a.t(this.c6);
a.t(this.c8);
}
}
}
};
FinancialIndicatorView.prototype.bi = function (a, b) {
if (a.d) {
if (this.cj.trendLineType != 0 && !b) {
var c = this.cl.g$n;
c.ad = this.cj.trendLineThickness;
c._stroke = this.cj.ab2;
c.aj = this.cj.ab4;
c.ai = this.cj.ab3;
a.v(c);
}
}
_super.prototype.bi.call(this, a, b);
};
FinancialIndicatorView.prototype.ax = function (a) {
_super.prototype.ax.call(this, a);
this.f.bc.exportPathData(a, this.c9, "positiveColumnsShape", ["Positive", "Main"]);
this.f.bc.exportPathData(a, this.c5, "negativeColumnsShape", ["Negative"]);
this.f.bc.exportPathData(a, this.da, "positive0", ["Positive", "Main"]);
this.f.bc.exportPathData(a, this.dc, "positive1", ["Positive"]);
this.f.bc.exportPathData(a, this.db, "positive01", ["PositiveFill"]);
this.f.bc.exportPathData(a, this.c6, "negative0", ["Negative", "Main"]);
this.f.bc.exportPathData(a, this.c8, "negative1", ["Negative"]);
this.f.bc.exportPathData(a, this.c7, "negative01", ["NegativeFill"]);
};
FinancialIndicatorView.prototype.ct = function () {
if (this.cn) {
this.ck = CategoryTrendLineManagerFactory.a(this.ck, this.f.a0(), this.f.s4, this.f, this.f.ds);
}
};
FinancialIndicatorView.$t = markType(FinancialIndicatorView, 'FinancialIndicatorView', FinancialSeriesView.$);
return FinancialIndicatorView;
}(FinancialSeriesView));
export { FinancialIndicatorView };