UNPKG

igniteui-react-charts

Version:

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

258 lines (257 loc) 9.27 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 { AnchoredCategorySeries } from "./AnchoredCategorySeries"; import { NumericXAxis } from "./NumericXAxis"; import { DependencyProperty } from "igniteui-react-core"; import { CategoryYAxis } from "./CategoryYAxis"; import { IVerticalAnchoredCategorySeriesInteractionManager_$type } from "./IVerticalAnchoredCategorySeriesInteractionManager"; import { DVContainer } from "igniteui-react-core"; import { runOn, typeCast, EnumUtil, markType, markDep } from "igniteui-react-core"; import { Axis } from "./Axis"; import { ScalerParams } from "./ScalerParams"; import { AxisRange } from "./AxisRange"; import { Rect } from "igniteui-react-core"; import { TrendLineType_$type } from "igniteui-react-core"; import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory"; import { PropertyMetadata } from "igniteui-react-core"; import { truncate, isNaN_, isInfinity } from "igniteui-react-core"; /** * @hidden */ export let VerticalAnchoredCategorySeries = /*@__PURE__*/ (() => { class VerticalAnchoredCategorySeries extends AnchoredCategorySeries { constructor() { super(...arguments); this.acl = null; } cl() { if (this.xAxis != null && this.xAxis.ch) { return 4; } return 3; } cm() { return 1; } o4() { super.o4(); this.xAxis = null; this.yAxis = null; } get acm() { if (this.acl == null) { this.acl = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n); } return this.acl; } get_isVertical() { return true; } yx() { return this.yAxis; } ze() { return this.xAxis; } getOffsetValue() { return this.y4.r(this.yx(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); } getCategoryWidth() { return this.yAxis.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); } j9(a, b) { return this.ka(a, b, this.yx(), runOn(this, this.zy), this.valueColumn); } kb(a, b) { return this.kc(a, b, this.yx(), runOn(this, this.zy), this.valueColumn); } iq(a, b, c, d, e) { if (this.valueColumn == null) { return Number.POSITIVE_INFINITY; } return this.ir(a, b, this.yAxis, d, e, this.valueColumn.count, runOn(this, this.zy)); } az(a) { if (a.isEmpty && this.dc != null) { a = this.dc.wt; } if (this.valueColumn == null) { return null; } let b = this.wo(this.cw); let c = this.yx(); let d = new ScalerParams(0, a, this.dc.xb, c.ch, this.getEffectiveViewport()); let e = (c.eo(b.top, d)); let f = (c.eo(b.bottom, d)); if (!c.ch) { let g = e; e = f; f = g; } e -= this.abi; f += this.abi; let h = null; if (c.cn) { h = c; e = h.i$f(e); f = h.i$f(f); } else { e = Math.floor(e); f = Math.ceil(f); } if (isNaN_(e) || isNaN_(f)) { return null; } e = Math.max(0, Math.min(this.valueColumn.count - 1, e)); f = Math.max(0, Math.min(this.valueColumn.count - 1, f)); let i = 1.7976931348623157E+308; let j = -1.7976931348623157E+308; if (truncate(e) <= truncate(f)) { for (let k = truncate(e); k <= truncate(f); k++) { let l = k; if (h != null) { l = h.i$b._inner[k]; } let m = this.valueColumn.item(l); if (this.valueColumn.mayContainUnknowns) { if (isInfinity(m) || isNaN_(m)) { continue; } } i = Math.min(i, m); j = Math.max(j, m); } } let n = new AxisRange(i, j); n = this.ax(n, this.ze(), a); return n; } b3() { if (this.b4 == 0) { return 1; } else { return super.b3(); } } wu(a) { if (!this.hasMarkers || !this.xl()) { return Rect.empty; } return this.acm.e$b(this, this.yz.p, a, runOn(this, this.acu)); } acu(a) { return this.aa2.ds(a); } gx(a, b) { if (this.gw(a, b)) { return true; } if (this.xm(a, b)) { return true; } return false; } i6(a, b, c) { if (this.dc == null) { return NaN; } let d = this.getEffectiveViewport1(this.cw); let e = this.yx(); let f = new ScalerParams(0, this.dc.wt, this.cw.b9, e.ch, d); let g = this.y4.r(e, this.dc.wt, this.cw.b9, d); return this.i8(this.valueColumn, a, e, f, g, runOn(this, this.zy), b, c); } wh(a, b, c) { let d = this.yx(); return this.wj(a, b, c, this.y4.r(d, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ze(), d, null, null, null); } fetchXAxis() { return this.xAxis; } fetchYAxis() { return this.yAxis; } aby(a) { this.xAxis = typeCast(NumericXAxis.$, a); } abz(a) { this.yAxis = typeCast(CategoryYAxis.$, a); } zu() { return this.xAxis != null && this.xAxis.c1(); } yr(a, b) { return this.aaz(a, b, this.yAxis); } is(a) { return this.acm.e$a(this, a); } zy(a) { return this.iu(a, this.yx()); } j4(a) { return truncate(Math.round(this.is(a))); } ko(a) { let b = this.j4(a); return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; } rc(a, b, c, d) { super.rc(a, b, c, d); switch (b) { case VerticalAnchoredCategorySeries.$$p[0]: if (c != d) { this.pe(typeCast(Axis.$, c)); this.rk(typeCast(Axis.$, d)); this.y8.c9.g(this.ie); if (this.dc != null) { this.dc.ok(); } this.ru(false); this.qn(); } break; case VerticalAnchoredCategorySeries.$$p[1]: if (c != d) { this.pe(typeCast(Axis.$, c)); this.rk(typeCast(Axis.$, d)); this.y8.c9.g(this.ie); this.zu(); this.ru(false); this.qn(); } break; case "TrendLineType": let e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.aa2.dk = CategoryTrendLineManagerFactory.a(this.aa2.dk, this.yAxis, this.sz, this, this.ds); } break; } } acp(a) { if (typeCast(CategoryYAxis.$, a) !== null) { return true; } return false; } aco(a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; } get useHighMarkerFidelity() { return this.zv; } } VerticalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$); VerticalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::acs', [NumericXAxis.$, null], 'YAxis::act', [CategoryYAxis.$, null]]); return VerticalAnchoredCategorySeries; })();