UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

300 lines (299 loc) 10.6 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 { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries"; import { CategoryLineRasterizer } from "./CategoryLineRasterizer"; import { typeCast, Array_$type, runOn, markType } from "igniteui-angular-core"; import { ISortingAxis_$type } from "./ISortingAxis"; import { List$1 } from "igniteui-angular-core"; import { Path } from "igniteui-angular-core"; import { ScalerParams } from "./ScalerParams"; import { ChartSelection } from "./ChartSelection"; import { intDivide, isNaN_ } from "igniteui-angular-core"; import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView"; import { Defaults } from "./Defaults"; /** * @hidden */ var StepAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(StepAreaSeries, _super); function StepAreaSeries() { var _this = _super.call(this) || this; _this.acv = null; _this.acv = new CategoryLineRasterizer(); _this.ab = StepAreaSeries.$; return _this; } StepAreaSeries.prototype.bj = function () { return new StepAreaSeries(); }; StepAreaSeries.prototype.cs = function () { return new StepAreaSeriesView(this); }; StepAreaSeries.prototype.q0 = function (a) { _super.prototype.q0.call(this, a); this.acw = a; }; StepAreaSeries.prototype.get_ev = function () { return true; }; StepAreaSeries.prototype.get_eu = function () { return true; }; StepAreaSeries.prototype.get_f0 = function () { return true; }; StepAreaSeries.prototype.get_fk = function () { return true; }; StepAreaSeries.prototype.cy = function () { if (this.cz == 0) { return 2; } return _super.prototype.cy.call(this); }; StepAreaSeries.prototype.preferredCategoryMode = function (a) { return typeCast(ISortingAxis_$type, a) !== null ? 0 : 1; }; StepAreaSeries.prototype.o4 = function (a, b) { _super.prototype.o4.call(this, a, b); var c = b; c.dg(); }; StepAreaSeries.prototype.acx = function (a, b, c, d, e) { if (b) { if (e) { if ((a & 1) == 0 || ((intDivide(a, 2)) + 1) >= c.f.count) { return c.f._inner[(intDivide(a, 2))][0]; } return c.f._inner[(intDivide(a, 2)) + 1][0]; } return c.f._inner[(intDivide(a, 2))][0] + ((a & 1) == 1 ? -d : d); } if (e) { if ((a & 1) == 0 || ((intDivide(a, 2)) + 1) >= c.f.count) { return c.f._inner[(intDivide(a, 2))][0]; } return c.f._inner[(intDivide(a, 2)) + 1][0]; } return c.f._inner[(intDivide(a, 2))][0] + ((a & 1) == 0 ? -d : d); }; StepAreaSeries.prototype.y3 = function () { return 1; }; StepAreaSeries.prototype.iu = function (a, b, c, d, e, f, g, h) { var i = NaN; if (c >= 0 && c < b.count) { i = b.item(c); } var j = NaN; if (d >= 0 && d < b.count) { j = b.item(d); } if (f == 0) { return j; } if (e == b.count - 1) { return i; } if (isNaN_(j) && g != 0 && a <= 0.5 && !h) { return i; } if (isNaN_(i) && g != 0 && a >= 0.5 && !h) { return j; } if (a > 0.5) { return j; } return i; }; StepAreaSeries.prototype.b2 = function () { if (this.b3 == 0) { return 2; } else { return _super.prototype.b2.call(this); } }; StepAreaSeries.prototype.aaj = function (a, b) { var _this = this; _super.prototype.aaj.call(this, a, b); var c = b.by; var d = b.bx; var e = this.getEffectiveViewport1(b); var f = typeCast(ISortingAxis_$type, this.acc) != null; var g = this.acc != null ? 0.5 * this.acc.getCategorySize(c, d, e) : 0; if (this.acc != null && this.acc.ch) { g = -g; } var h = a.f.count * 2; var i = new List$1(Array_$type, 2, h); this.y1.a2(this, this.zl(), runOn(this, this.yl), this.zu(b), this.zv(b)); var j = false; var k = this.y1.b; if (k != null) { j = true; } for (var l = 0; l < h; l++) { var m = new Array(4); m[0] = this.acx(l, false, a, g, f); m[1] = a.f._inner[(intDivide(l, 2))][1]; m[2] = this.acx(l, true, a, g, f); m[3] = a.f._inner[(intDivide(l, 2))][2]; i.add(m); } var n = this.y2.cw.d; if (j) { var o = new ScalerParams(0, b.by, b.bx, this.acc.ch, e); this.aaf(i, -1, this.valueColumn.count, this.acc, o, b.q, -1); } var p = typeCast(StepAreaSeriesView.$, b); var q = p.du; var r = p.dv; var s = p.ds; var t = p.dt; this.y1.ad(q, true, false, true, true); this.y1.ad(r, true, false, true, true); this.y1.ad(s, false, true, false, false); this.y1.ad(t, false, true, false, false); if (b.c0(a)) { p.di(h, i, false, n, this.ic, function (u, v, w, x, y) { return _this.abs(u, 2 * a.f.count, b); }, 1, this.aat(i, i.count - 1, b.bx, b.by, true)); b.c3(a); } var u = this.fetchYAxis(); p.ds._opacity = this.y1.j * this.h8; p.dt._opacity = 0.5 * this.y1.j * this.h8; }; StepAreaSeries.prototype.p3 = function (a, b, c) { this.aab(a, b, c, this.ys, 1); }; StepAreaSeries.prototype.ak = function (a, b) { var c = new List$1(ChartSelection.$, 0); this.p3(a, c, b); return c.toArray(); }; Object.defineProperty(StepAreaSeries.prototype, "useHighMarkerFidelity", { get: function () { return this.zp; }, enumerable: false, configurable: true }); StepAreaSeries.$t = markType(StepAreaSeries, 'StepAreaSeries', HorizontalAnchoredCategorySeries.$); return StepAreaSeries; }(HorizontalAnchoredCategorySeries)); export { StepAreaSeries }; /** * @hidden */ var StepAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(StepAreaSeriesView, _super); function StepAreaSeriesView(a) { var _this = _super.call(this, a) || this; _this.df = null; _this.dn = new Path(); _this.dq = new Path(); _this.dp = new Path(); _this.dr = new Path(); _this.dj = new Path(); _this.dl = new Path(); _this.dk = new Path(); _this.dm = new Path(); _this.df = a; return _this; } StepAreaSeriesView.prototype.au = function () { _super.prototype.au.call(this); if (!this.q) { this.df.w9 = Defaults.c; } }; Object.defineProperty(StepAreaSeriesView.prototype, "ds", { get: function () { return this.dn; }, enumerable: false, configurable: true }); Object.defineProperty(StepAreaSeriesView.prototype, "du", { get: function () { return this.dq; }, enumerable: false, configurable: true }); Object.defineProperty(StepAreaSeriesView.prototype, "dt", { get: function () { return this.dp; }, enumerable: false, configurable: true }); Object.defineProperty(StepAreaSeriesView.prototype, "dv", { get: function () { return this.dr; }, enumerable: false, configurable: true }); StepAreaSeriesView.prototype.dg = function () { this.dn.an = null; this.dp.an = null; this.dq.an = null; this.dr.an = null; this.as(); }; StepAreaSeriesView.prototype.dh = function (a, b, c, d, e, f, g) { this.dh(a, b, c, d, e, f, g); }; StepAreaSeriesView.prototype.di = function (a, b, c, d, e, f, g, h) { this.df.acv.a = typeCast(ISortingAxis_$type, this.cy.fetchXAxis()) !== null ? true : false; this.df.acv.j(this.dn, this.dq, this.dp, this.dr, a, b, c, d, e, f, g, h); this.as(); }; StepAreaSeriesView.prototype.be = function () { _super.prototype.be.call(this); this.dj.an = this.dn.an; this.dl.an = this.dq.an; this.dk.an = this.dp.an; this.dm.an = this.dr.an; var a = this.br(); this.dj._fill = a; this.dj._opacity = 1; this.dk._fill = a; this.dk._opacity = 1; this.dl._stroke = a; this.dl.ad = this.e.id + 3; this.dm._stroke = a; this.dm.ad = this.e.id + 3; }; StepAreaSeriesView.prototype.a8 = function (a, b) { _super.prototype.a8.call(this, a, b); if (b) { a.t(this.dj); a.t(this.dk); a.t(this.dl); a.t(this.dm); } else { a.t(this.dn); a.t(this.dp); a.t(this.dq); a.t(this.dr); } }; StepAreaSeriesView.prototype.an = function (a) { _super.prototype.an.call(this, a); this.e.bc.exportPathData(a, this.dq, "lowerShape", ["Lower"]); this.e.bc.exportPathData(a, this.dr, "upperShape", ["Upper", "Main"]); this.e.bc.exportPathData(a, this.dp, "translucentShape", ["Translucent"]); this.e.bc.exportPathData(a, this.dn, "fillShape", ["Fill"]); }; StepAreaSeriesView.$t = markType(StepAreaSeriesView, 'StepAreaSeriesView', AnchoredCategorySeriesView.$); return StepAreaSeriesView; }(AnchoredCategorySeriesView)); export { StepAreaSeriesView };