UNPKG

igniteui-angular-charts

Version:

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

201 lines (200 loc) 6.53 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 { HorizontalRangeCategorySeries } from "./HorizontalRangeCategorySeries"; import { Array_$type, typeCast, runOn, markType } from "igniteui-angular-core"; import { List$1 } from "igniteui-angular-core"; import { Polyline } from "igniteui-angular-core"; import { Polygon } from "igniteui-angular-core"; import { ScalerParams } from "./ScalerParams"; import { ChartSelection } from "./ChartSelection"; import { isNaN_ } from "igniteui-angular-core"; import { RangeCategorySeriesView } from "./RangeCategorySeriesView"; /** * @hidden */ export let RangeAreaSeries = /*@__PURE__*/ (() => { class RangeAreaSeries extends HorizontalRangeCategorySeries { constructor() { super(); this.ab = RangeAreaSeries.$; } bj() { return new RangeAreaSeries(); } cs() { return new RangeAreaSeriesView(this); } q0(a) { super.q0(a); this.abz = a; } get_ev() { return true; } get_eu() { return true; } ab0(a, b, c, d) { if (isNaN_(b.x) || isNaN_(b.y)) { return false; } if (isNaN_(c.x) || isNaN_(c.y)) { return false; } if ((a.y <= b.y && a.y >= c.y)) { return true; } return false; } gv(a, b) { if (this.gu(a, b)) { return true; } if (this.xg(a, b)) { return true; } return false; } preferredCategoryMode(a) { return 0; } o4(a, b) { super.o4(a, b); let c = b; c.c8(); } aaj(a, b) { super.aaj(a, b); let c = a.f.count; let d = new List$1(Array_$type, 2, c); for (let e = 0; e < c; e++) { let f = a.f._inner[e]; let g = new Array(4); g[0] = f[0]; g[1] = f[1]; let h = a.f._inner[a.f.count - 1 - e]; g[2] = h[0]; g[3] = h[2]; d.add(g); } let i = typeCast(RangeAreaSeriesView.$, b); let j = this.getEffectiveViewport1(i); this.y1.a2(this, this.zl(), runOn(this, this.yl), this.zu(b), this.zv(b)); let k = false; let l = this.y1.b; if (l != null) { k = true; } if (k) { let m = new ScalerParams(0, b.by, b.bx, this.xAxis.ch, j); this.aaf(d, -1, this.lowColumn.count, this.xAxis, m, b.q, -1); } let n = i.dh; let o = i.di; let p = i.dc; this.y1.ad(n, true, false, true, true); this.y1.ad(o, true, false, true, true); this.y1.ad(p, false, true, false, false); if (b.c0(a)) { i.c9(a.f.count, d, false); b.c3(a); } i.dc._opacity = this.y1.j * this.h8; } p3(a, b, c) { this.aab(a, b, c, this.ys, 1); } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.p3(a, c, b); return c.toArray(); } get useHighMarkerFidelity() { return this.zp; } } RangeAreaSeries.$t = markType(RangeAreaSeries, 'RangeAreaSeries', HorizontalRangeCategorySeries.$); return RangeAreaSeries; })(); /** * @hidden */ export let RangeAreaSeriesView = /*@__PURE__*/ (() => { class RangeAreaSeriesView extends RangeCategorySeriesView { constructor(a) { super(a); this.c7 = null; this.df = new Polyline(); this.db = new Polygon(); this.dg = new Polyline(); this.de = new Polyline(); this.dd = new Polyline(); this.da = new Polygon(); this.c7 = a; } au() { super.au(); if (!this.q) { this.c7.w9 = 1; } } get dh() { return this.df; } get dc() { return this.db; } get di() { return this.dg; } c8() { this.db.an.clear(); this.df.an.clear(); this.dg.an.clear(); } c9(a, b, c) { this.c6(this.df, this.db, this.dg, a, b, c); this.as(); } be() { super.be(); this.dd.an = this.df.an; this.de.an = this.dg.an; this.da.an = this.db.an; let a = this.br(); this.dd._stroke = a; this.dd.ad = this.e.id + 3; this.de._stroke = a; this.de.ad = this.e.id + 3; this.da._fill = a; this.da._opacity = 1; } a8(a, b) { super.a8(a, b); if (a.d) { if (b) { a.u(this.da); a.v(this.dd); a.v(this.de); } else { a.u(this.db); a.v(this.df); a.v(this.dg); } } } an(a) { super.an(a); this.e.bc.exportPolylineData(a, this.df, "lowerShape", ["Lower"]); this.e.bc.exportPolylineData(a, this.dg, "upperShape", ["Upper", "Main"]); this.e.bc.exportPolygonData(a, this.db, "fillShape", ["Fill"]); } } RangeAreaSeriesView.$t = markType(RangeAreaSeriesView, 'RangeAreaSeriesView', RangeCategorySeriesView.$); return RangeAreaSeriesView; })();