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.aa9 = null; _this.aba = 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.ri = function (a) { _super.prototype.ri.call(this, a); this.aav = a; }; TrendLineLayer.prototype.get_ev = function () { return true; }; TrendLineLayer.prototype.get_fo = function () { return true; }; TrendLineLayer.prototype.get_isUsableInLegend = function () { return this.x8 && this.aat != null; }; TrendLineLayer.prototype.ze = function (a, b) { if (this.aat == null || this.aat == a) { if (!this.a1.c) { this.r9(b); } } }; TrendLineLayer.prototype.x5 = 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.sb = function (a, b) { _super.prototype.sb.call(this, a, b); if (this.aat != null && this.aat.cv == null) { this.aat.sc(); } this.cw.be(b); var c = typeCast(TrendLineLayerView.$, this.cv); if (this.aat != null && c.cp) { this.aat.sc(); c.cp = false; } }; TrendLineLayer.prototype.r8 = function (a, b, c, d, e) { _super.prototype.r8.call(this, a, b, c, d, e); var f = typeCast(TrendLineLayerView.$, this.cv); if (this.aat != null) { this.aat.r8(a, b, c, d, e); } this.cw.bd(c); }; TrendLineLayer.prototype.zf = function (a) { _super.prototype.zf.call(this, a); if (this.aat == null) { this.aa4(); } else { if (a.oldItems != null && a.oldItems.contains(this.aat)) { this.aat = null; } } }; TrendLineLayer.prototype.aaz = function () { switch (this.aaw) { 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.aa4 = function () { if (this.aau != null && this.x5(this.aau)) { this.aat = this.aau; return; } }; TrendLineLayer.prototype.aa1 = function (a, b) { this.aav.ct(a, b); if (b != null) { b.r9(true); } this.pa(this.a5, this.a5); }; TrendLineLayer.prototype.aa3 = function () { if (this.aat != null && this.aav.cn != null) { this.aav.cn.g$b = this.aaw; this.aat.r9(true); } }; TrendLineLayer.prototype.aa2 = function () { if (this.aat != null && this.aav.cn != null) { this.aav.cn.g$f = this.aax; this.aat.r9(true); } }; TrendLineLayer.prototype.s0 = function () { _super.prototype.s0.call(this); this.q1(); this.zo(); }; TrendLineLayer.prototype.zo = function () { _super.prototype.zo.call(this); var a = this.vu; if (!this.x7) { if (this.aat != null) { a = this.v0 != null ? this.v0 : this.aat.vu; if (this.aa9 == null) { this.aa9 = this.vu; } } else { if (this.aa9 != null) { a = this.aa9; } } } switch (this.xk) { case 0: case 1: a = this.aav.ck(a, this.ya); break; case 2: a = this.aav.cm(a, this.ya); break; case 4: a = this.aav.cl(a, this.ya); break; } this.vu = a; }; TrendLineLayer.prototype.xo = function () { return 3; }; TrendLineLayer.prototype.yc = function () { return 0.3; }; TrendLineLayer.prototype.yf = function () { return -0.4; }; TrendLineLayer.prototype.ye = function () { return 0.5; }; TrendLineLayer.prototype.aah = function () { return this.xk == 3 ? this.abb() : null; }; TrendLineLayer.prototype.abb = function () { if (this.aba == null) { this.aba = new DoubleCollection(); this.aba.add(DeviceUtils.g(5)); this.aba.add(DeviceUtils.g(5)); } return this.aba; }; TrendLineLayer.prototype.rr = function (a, b, c, d) { _super.prototype.rr.call(this, a, b, c, d); switch (b) { case "SeriesViewer": this.aa4(); break; case "TrendLineType": this.aa3(); break; case "TrendLinePeriod": this.aa2(); break; case TrendLineLayer.$$p[0]: this.aa1(c, d); this.zo(); this.aav.cs(); break; case TrendLineLayer.$$p[1]: this.aa4(); break; case "ActualBrush": case "ActualThickness": case AnnotationLayer.$$p[1]: case "DashCap": this.aav.cs(); break; case "UseItemWiseColors": this.zo(); break; } }; TrendLineLayer.prototype.qe = function (a) { _super.prototype.qe.call(this, a); this.aav.ax(a); }; TrendLineLayer.$t = markType(TrendLineLayer, 'TrendLineLayer', AnnotationLayer.$); TrendLineLayer.$$p = markDep(DependencyProperty, PropertyMetadata, TrendLineLayer, 'raisePropertyChanged', ['ActualTargetSeries:aat:aa5', [Series.$, null], 'TargetSeries:aau:aa6', [Series.$, null], 'TrendLineType:aaw:aa8', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLinePeriod:aax:aa7', [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.aat != null) { if (this.t) { var a = this.co.aat.cv; this.cn = a.e(); this.cp = true; } else if (this.s) { var b = this.co.aat.ba.a$k.item(this.al); this.cn = b.e(); } else { var c = this.co.aat.cw; this.cn = c.e(); } if (this.cn != null) { this.cn.g$b = this.co.aaw; this.cn.g$f = this.co.aax; this.cs(); } } }; TrendLineLayerView.prototype.bj = function (a, b) { _super.prototype.bj.call(this, a, b); if (this.cn != null && a.d) { if (this.co.aaw != 0 && !b) { var c = this.cn.g$n; c.ad = this.co.im; c._stroke = this.co.vu; c.ai = this.co.aae; c.aj = this.co.wo; 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.im; this.cn.g$n._stroke = this.co.vu; this.cn.g$n.ai = this.co.aae; this.cn.g$n.aj = this.co.wo; } }; 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 };