UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

334 lines (333 loc) 11.1 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { AnnotationLayer } from "./AnnotationLayer"; import { Series } from "./Series"; import { DependencyProperty } from "igniteui-react-core"; import { TrendLineType_$type } from "igniteui-react-core"; import { ValueOverlay } from "./ValueOverlay"; import { enumGetBox, typeCast, markType, markDep } from "igniteui-react-core"; import { AnnotationLayerView } from "./AnnotationLayerView"; import { DoubleCollection } from "igniteui-react-core"; import { DeviceUtils } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; /** * @hidden */ var TrendLineLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(TrendLineLayer, _super); function TrendLineLayer() { var _this = _super.call(this) || this; _this.aa8 = null; _this.aa9 = null; _this.ab = TrendLineLayer.$; return _this; } TrendLineLayer.prototype.bk = function () { return new ValueOverlay(); }; TrendLineLayer.prototype.ac = function () { _super.prototype.ac.call(this); }; TrendLineLayer.prototype.ct = function () { return new TrendLineLayerView(this); }; TrendLineLayer.prototype.rh = function (a) { _super.prototype.rh.call(this, a); this.aau = a; }; TrendLineLayer.prototype.get_ev = function () { return true; }; TrendLineLayer.prototype.get_fn = function () { return true; }; TrendLineLayer.prototype.get_isUsableInLegend = function () { return this.x7 && this.aas != null; }; TrendLineLayer.prototype.zd = function (a, b) { if (this.aas == null || this.aas == a) { if (!this.a1.c) { this.r8(b); } } }; TrendLineLayer.prototype.x4 = function (a) { if (a == null) { return false; } if (a == this) { return false; } if (a.dc != this.dc) { return false; } if (a.ev || a.isStacked) { return false; } return true; }; TrendLineLayer.prototype.sa = function (a, b) { _super.prototype.sa.call(this, a, b); if (this.aas != null && this.aas.cv == null) { this.aas.sb(); } this.cw.be(b); var c = typeCast(TrendLineLayerView.$, this.cv); if (this.aas != null && c.cp) { this.aas.sb(); c.cp = false; } }; TrendLineLayer.prototype.r7 = function (a, b, c, d, e) { _super.prototype.r7.call(this, a, b, c, d, e); var f = typeCast(TrendLineLayerView.$, this.cv); if (this.aas != null) { this.aas.r7(a, b, c, d, e); } this.cw.bd(c); }; TrendLineLayer.prototype.ze = function (a) { _super.prototype.ze.call(this, a); if (this.aas == null) { this.aa3(); } else { if (a.oldItems != null && a.oldItems.contains(this.aas)) { this.aas = null; } } }; TrendLineLayer.prototype.aay = function () { switch (this.aav) { case 3: return "TrendLineLayer_CubicFit"; case 12: return "TrendLineLayer_CumulativeAverage"; case 10: return "TrendLineLayer_ExponentialAverage"; case 7: return "TrendLineLayer_ExponentialAverage"; case 1: return "TrendLineLayer_LinearFit"; case 6: return "TrendLineLayer_LogarithmicFit"; case 11: return "TrendLineLayer_ModifiedAverage"; case 8: return "TrendLineLayer_PowerLawFit"; case 2: return "TrendLineLayer_QuadraticFit"; case 4: return "TrendLineLayer_QuarticFit"; case 5: return "TrendLineLayer_QuinticFit"; case 9: return "TrendLineLayer_SimpleAverage"; case 13: return "TrendLineLayer_WeightedAverage"; } return null; }; TrendLineLayer.prototype.aa3 = function () { if (this.aat != null && this.x4(this.aat)) { this.aas = this.aat; return; } }; TrendLineLayer.prototype.aa0 = function (a, b) { this.aau.ct(a, b); if (b != null) { b.r8(true); } this.o9(this.a5, this.a5); }; TrendLineLayer.prototype.aa2 = function () { if (this.aas != null && this.aau.cn != null) { this.aau.cn.g$b = this.aav; this.aas.r8(true); } }; TrendLineLayer.prototype.aa1 = function () { if (this.aas != null && this.aau.cn != null) { this.aau.cn.g$f = this.aaw; this.aas.r8(true); } }; TrendLineLayer.prototype.sz = function () { _super.prototype.sz.call(this); this.q0(); this.zn(); }; TrendLineLayer.prototype.zn = function () { _super.prototype.zn.call(this); var a = this.vt; if (!this.x6) { if (this.aas != null) { a = this.vz != null ? this.vz : this.aas.vt; if (this.aa8 == null) { this.aa8 = this.vt; } } else { if (this.aa8 != null) { a = this.aa8; } } } switch (this.xj) { case 0: case 1: a = this.aau.ck(a, this.x9); break; case 2: a = this.aau.cm(a, this.x9); break; case 4: a = this.aau.cl(a, this.x9); break; } this.vt = a; }; TrendLineLayer.prototype.xn = function () { return 3; }; TrendLineLayer.prototype.yb = function () { return 0.3; }; TrendLineLayer.prototype.ye = function () { return -0.4; }; TrendLineLayer.prototype.yd = function () { return 0.5; }; TrendLineLayer.prototype.aag = function () { return this.xj == 3 ? this.aba() : null; }; TrendLineLayer.prototype.aba = function () { if (this.aa9 == null) { this.aa9 = new DoubleCollection(); this.aa9.add(DeviceUtils.g(5)); this.aa9.add(DeviceUtils.g(5)); } return this.aa9; }; TrendLineLayer.prototype.rq = function (a, b, c, d) { _super.prototype.rq.call(this, a, b, c, d); switch (b) { case "SeriesViewer": this.aa3(); break; case "TrendLineType": this.aa2(); break; case "TrendLinePeriod": this.aa1(); break; case TrendLineLayer.$$p[0]: this.aa0(c, d); this.zn(); this.aau.cs(); break; case TrendLineLayer.$$p[1]: this.aa3(); break; case "ActualBrush": case "ActualThickness": case AnnotationLayer.$$p[1]: case "DashCap": this.aau.cs(); break; case "UseItemWiseColors": this.zn(); break; } }; TrendLineLayer.prototype.qd = function (a) { _super.prototype.qd.call(this, a); this.aau.ax(a); }; TrendLineLayer.$t = markType(TrendLineLayer, 'TrendLineLayer', AnnotationLayer.$); TrendLineLayer.$$p = markDep(DependencyProperty, PropertyMetadata, TrendLineLayer, 'raisePropertyChanged', ['ActualTargetSeries:aas:aa4', [Series.$, null], 'TargetSeries:aat:aa5', [Series.$, null], 'TrendLineType:aav:aa7', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLinePeriod:aaw:aa6', [1, 7]]); return TrendLineLayer; }(AnnotationLayer)); export { TrendLineLayer }; /** * @hidden */ var TrendLineLayerView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(TrendLineLayerView, _super); function TrendLineLayerView(a) { var _this = _super.call(this, a) || this; _this.cq = 0; _this.co = null; _this.cn = null; _this.cp = false; _this.co = a; _this.cq = TrendLineLayerView.cr++; return _this; } TrendLineLayerView.prototype.cu = function () { if (this.cn == null && this.co.aas != null) { if (this.t) { var a = this.co.aas.cv; this.cn = a.e(); this.cp = true; } else if (this.s) { var b = this.co.aas.ba.a$k.item(this.al); this.cn = b.e(); } else { var c = this.co.aas.cw; this.cn = c.e(); } if (this.cn != null) { this.cn.g$b = this.co.aav; this.cn.g$f = this.co.aaw; this.cs(); } } }; TrendLineLayerView.prototype.bj = function (a, b) { _super.prototype.bj.call(this, a, b); if (this.cn != null && a.d) { if (this.co.aav != 0 && !b) { var c = this.cn.g$n; c.ad = this.co.il; c._stroke = this.co.vt; c.ai = this.co.aad; c.aj = this.co.wn; a.v(c); } } }; TrendLineLayerView.prototype.ct = function (a, b) { if (a != null) { var c = null; if (this.t) { c = a.cv; } else if (this.s) { c = a.ba.a$k.item(this.al); } else { c = a.cw; } if (this.cn != null) { c.bf(this.cn); this.cn = null; } } this.cu(); }; TrendLineLayerView.prototype.cs = function () { if (this.cn != null) { this.cn.g$n.ad = this.co.il; this.cn.g$n._stroke = this.co.vt; this.cn.g$n.ai = this.co.aad; this.cn.g$n.aj = this.co.wn; } }; TrendLineLayerView.prototype.ax = function (a) { _super.prototype.ax.call(this, a); if (this.cn != null) { this.co.bc.exportTrendlineData(this.co, a, this.cn.g$n); } }; TrendLineLayerView.$t = markType(TrendLineLayerView, 'TrendLineLayerView', AnnotationLayerView.$); TrendLineLayerView.cr = 0; return TrendLineLayerView; }(AnnotationLayerView)); export { TrendLineLayerView };