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); } q8(a) { super.q8(a); this.acd = a; } get_ex() { return true; } get_ew() { return true; } ace(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; } gx(a, b) { if (this.gw(a, b)) { return true; } if (this.xs(a, b)) { return true; } return false; } constructor() { super(); this.ab = RangeAreaSeries.$; } preferredCategoryMode(a) { return 0; } pb(a, b) { super.pb(a, b); let c = b; c.dl(); } aay(a, b) { super.aay(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.zd.a2(this, this.zx(), runOn(this, this.yx), this.z6(b), this.z7(b)); let k = false; let l = this.zd.b; if (l != null) { k = true; } if (k) { let m = new ScalerParams(0, b.ca, b.b9, this.xAxis.df, j); this.aau(d, -1, this.lowColumn.count, this.xAxis, m, b.t, -1); } let n = i.dv; let o = i.dw; let p = i.dq; this.zd.ad(n, true, false, true, true); this.zd.ad(o, true, false, true, true); this.zd.ad(p, false, true, false, false); if (b.dd(a)) { i.dm(a.h.count, d, false); b.dg(a); } i.dq._opacity = this.zd.j * this.ia; } qa(a, b, c) { this.aaq(a, b, c, this.y4, 1); } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.qa(a, c, b); return c.toArray(); } get useHighMarkerFidelity() { return this.z1; } } RangeAreaSeries.$t = /*@__PURE__*/ markType(RangeAreaSeries, 'RangeAreaSeries', HorizontalRangeCategorySeries.$); return RangeAreaSeries; })(); /** * @hidden */ export let RangeAreaSeriesView = /*@__PURE__*/ (() => { class RangeAreaSeriesView extends RangeCategorySeriesView { constructor(a) { super(a); this.dk = null; this.dt = new Polyline(); this.dp = new Polygon(); this.du = new Polyline(); this.ds = new Polyline(); this.dr = new Polyline(); this.dn = new Polygon(); this.dk = a; } a4() { super.a4(); if (!this.t) { this.dk.xl = 1; } } get dv() { return this.dt; } get dq() { return this.dp; } get dw() { return this.du; } dl() { this.dp.an.clear(); this.dt.an.clear(); this.du.an.clear(); } dm(a, b, c) { this.dj(this.dt, this.dp, this.du, a, b, c); this.a2(); } bq() { super.bq(); this.dr.an = this.dt.an; this.ds.an = this.du.an; this.dn.an = this.dp.an; let a = this.b3(); this.dr._stroke = a; this.dr.ad = this.f.ig + 3; this.ds._stroke = a; this.ds.ad = this.f.ig + 3; this.dn._fill = a; this.dn._opacity = 1; } bj(a, b) { super.bj(a, b); if (a.d) { if (b) { a.u(this.dn); a.v(this.dr); a.v(this.ds); } else { a.u(this.dp); a.v(this.dt); a.v(this.du); } } } ax(a) { super.ax(a); this.f.bc.exportPolylineData(a, this.dt, "lowerShape", ["Lower"]); this.f.bc.exportPolylineData(a, this.du, "upperShape", ["Upper", "Main"]); this.f.bc.exportPolygonData(a, this.dp, "fillShape", ["Fill"]); } } RangeAreaSeriesView.$t = /*@__PURE__*/ markType(RangeAreaSeriesView, 'RangeAreaSeriesView', RangeCategorySeriesView.$); return RangeAreaSeriesView; })();