UNPKG

igniteui-react-charts

Version:

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

201 lines (200 loc) 6.34 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-react-core"; import { List$1 } from "igniteui-react-core"; import { Polyline } from "igniteui-react-core"; import { Polygon } from "igniteui-react-core"; import { ScalerParams } from "./ScalerParams"; import { ChartSelection } from "./ChartSelection"; import { isNaN_ } from "igniteui-react-core"; import { RangeCategorySeriesView } from "./RangeCategorySeriesView"; /** * @hidden */ export let RangeAreaSeries = /*@__PURE__*/ (() => { class RangeAreaSeries extends HorizontalRangeCategorySeries { bk() { return new RangeAreaSeries(); } ct() { return new RangeAreaSeriesView(this); } q1(a) { super.q1(a); this.ab1 = a; } get_ew() { return true; } get_ev() { return true; } ab2(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; } gw(a, b) { if (this.gv(a, b)) { return true; } if (this.xj(a, b)) { return true; } return false; } constructor() { super(); this.ab = RangeAreaSeries.$; } preferredCategoryMode(a) { return 0; } o5(a, b) { super.o5(a, b); let c = b; c.dc(); } aam(a, b) { super.aam(a, b); let c = a.h.count; let d = new List$1(Array_$type, 2, c); for (let e = 0; e < c; e++) { let f = a.h._inner[e]; let g = new Array(4); g[0] = f[0]; g[1] = f[1]; let h = a.h._inner[a.h.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.y4.a2(this, this.zo(), runOn(this, this.yo), this.zx(b), this.zy(b)); let k = false; let l = this.y4.b; if (l != null) { k = true; } if (k) { let m = new ScalerParams(0, b.b2, b.b1, this.xAxis.ch, j); this.aai(d, -1, this.lowColumn.count, this.xAxis, m, b.r, -1); } let n = i.dl; let o = i.dm; let p = i.dg; this.y4.ad(n, true, false, true, true); this.y4.ad(o, true, false, true, true); this.y4.ad(p, false, true, false, false); if (b.c4(a)) { i.dd(a.h.count, d, false); b.c7(a); } i.dg._opacity = this.y4.j * this.h9; } p4(a, b, c) { this.aae(a, b, c, this.yv, 1); } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.p4(a, c, b); return c.toArray(); } get useHighMarkerFidelity() { return this.zs; } } RangeAreaSeries.$t = /*@__PURE__*/ markType(RangeAreaSeries, 'RangeAreaSeries', HorizontalRangeCategorySeries.$); return RangeAreaSeries; })(); /** * @hidden */ export let RangeAreaSeriesView = /*@__PURE__*/ (() => { class RangeAreaSeriesView extends RangeCategorySeriesView { constructor(a) { super(a); this.db = null; this.dj = new Polyline(); this.df = new Polygon(); this.dk = new Polyline(); this.di = new Polyline(); this.dh = new Polyline(); this.de = new Polygon(); this.db = a; } ax() { super.ax(); if (!this.r) { this.db.xc = 1; } } get dl() { return this.dj; } get dg() { return this.df; } get dm() { return this.dk; } dc() { this.df.an.clear(); this.dj.an.clear(); this.dk.an.clear(); } dd(a, b, c) { this.da(this.dj, this.df, this.dk, a, b, c); this.av(); } bi() { super.bi(); this.dh.an = this.dj.an; this.di.an = this.dk.an; this.de.an = this.df.an; let a = this.bv(); this.dh._stroke = a; this.dh.ad = this.f.ie + 3; this.di._stroke = a; this.di.ad = this.f.ie + 3; this.de._fill = a; this.de._opacity = 1; } bc(a, b) { super.bc(a, b); if (a.d) { if (b) { a.u(this.de); a.v(this.dh); a.v(this.di); } else { a.u(this.df); a.v(this.dj); a.v(this.dk); } } } aq(a) { super.aq(a); this.f.bc.exportPolylineData(a, this.dj, "lowerShape", ["Lower"]); this.f.bc.exportPolylineData(a, this.dk, "upperShape", ["Upper", "Main"]); this.f.bc.exportPolygonData(a, this.df, "fillShape", ["Fill"]); } } RangeAreaSeriesView.$t = /*@__PURE__*/ markType(RangeAreaSeriesView, 'RangeAreaSeriesView', RangeCategorySeriesView.$); return RangeAreaSeriesView; })();