UNPKG

igniteui-angular-charts

Version:

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

258 lines (257 loc) 9.52 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-angular-core"; import { CategoryYAxis } from "./CategoryYAxis"; import { IVerticalAnchoredCategorySeriesInteractionManager_$type } from "./IVerticalAnchoredCategorySeriesInteractionManager"; import { DVContainer } from "igniteui-angular-core"; import { runOn, typeCast, EnumUtil, markType, markDep } from "igniteui-angular-core"; import { Axis } from "./Axis"; import { ScalerParams } from "./ScalerParams"; import { AxisRange } from "./AxisRange"; import { Rect } from "igniteui-angular-core"; import { TrendLineType_$type } from "igniteui-angular-core"; import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory"; import { PropertyMetadata } from "igniteui-angular-core"; import { truncate, isNaN_, isInfinity } from "igniteui-angular-core"; /** * @hidden */ export let VerticalAnchoredCategorySeries = /*@__PURE__*/ (() => { class VerticalAnchoredCategorySeries extends AnchoredCategorySeries { constructor() { super(...arguments); this.ac0 = null; } cl() { if (this.xAxis != null && this.xAxis.dn) { return 4; } return 3; } cm() { return 1; } pe() { super.pe(); this.xAxis = null; this.yAxis = null; } get ac1() { if (this.ac0 == null) { this.ac0 = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n); } return this.ac0; } get_isVertical() { return true; } zc() { return this.yAxis; } zt() { return this.xAxis; } getOffsetValue() { return this.zj.r(this.zc(), 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)); } kh(a, b) { return this.ki(a, b, this.zc(), runOn(this, this.aad), this.valueColumn); } kj(a, b) { return this.kk(a, b, this.zc(), runOn(this, this.aad), this.valueColumn); } iw(a, b, c, d, e) { if (this.valueColumn == null) { return Number.POSITIVE_INFINITY; } return this.ix(a, b, this.yAxis, d, e, this.valueColumn.count, runOn(this, this.aad)); } az(a) { if (a.isEmpty && this.dc != null) { a = this.dc.yr; } if (this.valueColumn == null) { return null; } let b = this.w3(this.cw); let c = this.zc(); let d = new ScalerParams(0, a, this.dc.y9, c.dn, this.getEffectiveViewport()); let e = (c.f8(b.top, d)); let f = (c.f8(b.bottom, d)); if (!c.dn) { let g = e; e = f; f = g; } e -= this.abx; f += this.abx; let h = null; if (c.dv) { 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.zt(), a); return n; } b3() { if (this.b4 == 0) { return 1; } else { return super.b3(); } } w9(a) { if (!this.hasMarkers || !this.x0()) { return Rect.empty; } return this.ac1.e$b(this, this.ze.s, a, runOn(this, this.ac9)); } ac9(a) { return this.abh.ds(a); } g2(a, b) { if (this.g1(a, b)) { return true; } if (this.x1(a, b)) { return true; } return false; } jd(a, b, c) { if (this.dc == null) { return NaN; } let d = this.getEffectiveViewport1(this.cw); let e = this.zc(); let f = new ScalerParams(0, this.dc.yr, this.cw.b9, e.dn, d); let g = this.zj.r(e, this.dc.yr, this.cw.b9, d); return this.jf(this.valueColumn, a, e, f, g, runOn(this, this.aad), b, c); } wv(a, b, c) { let d = this.zc(); return this.wx(a, b, c, this.zj.r(d, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.zt(), d, null, null, null); } fetchXAxis() { return this.xAxis; } fetchYAxis() { return this.yAxis; } acd(a) { this.xAxis = typeCast(NumericXAxis.$, a); } ace(a) { this.yAxis = typeCast(CategoryYAxis.$, a); } z9() { return this.xAxis != null && this.xAxis.ec(); } y6(a, b) { return this.abe(a, b, this.yAxis); } iy(a) { return this.ac1.e$a(this, a); } aad(a) { return this.i0(a, this.zc()); } kc(a) { return truncate(Math.round(this.iy(a))); } kw(a) { let b = this.kc(a); return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; } rp(a, b, c, d) { super.rp(a, b, c, d); switch (b) { case VerticalAnchoredCategorySeries.$$p[0]: if (c != d) { this.po(typeCast(Axis.$, c)); this.rx(typeCast(Axis.$, d)); this.zn.c9.g(this.ik); if (this.dc != null) { this.dc.pq(); } this.r7(false); this.qz(); } break; case VerticalAnchoredCategorySeries.$$p[1]: if (c != d) { this.po(typeCast(Axis.$, c)); this.rx(typeCast(Axis.$, d)); this.zn.c9.g(this.ik); this.z9(); this.r7(false); this.qz(); } break; case "TrendLineType": let e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.abh.dk = CategoryTrendLineManagerFactory.a(this.abh.dk, this.yAxis, this.tc, this, this.ds); } break; } } ac4(a) { if (typeCast(CategoryYAxis.$, a) !== null) { return true; } return false; } ac3(a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; } get useHighMarkerFidelity() { return this.aaa; } } VerticalAnchoredCategorySeries.$t = markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$); VerticalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::ac7', [NumericXAxis.$, null], 'YAxis::ac8', [CategoryYAxis.$, null]]); return VerticalAnchoredCategorySeries; })();