UNPKG

igniteui-react-charts

Version:

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

287 lines (286 loc) 10.7 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 { IHorizontalAnchoredCategorySeriesInteractionManager_$type } from "./IHorizontalAnchoredCategorySeriesInteractionManager"; import { DVContainer } from "igniteui-react-core"; import { runOn, Point_$type, typeCast, EnumUtil, enumGetBox, markType, markDep } from "igniteui-react-core"; import { CategoryAxisBase } from "./CategoryAxisBase"; import { DependencyProperty } from "igniteui-react-core"; import { NumericYAxis } from "./NumericYAxis"; import { CategoryMode_$type } from "./CategoryMode"; import { Axis } from "./Axis"; import { Rect } from "igniteui-react-core"; import { ScalerParams } from "./ScalerParams"; import { TrendLineType_$type } from "igniteui-react-core"; import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory"; import { ISortingAxis_$type } from "./ISortingAxis"; import { CategoryXAxis } from "./CategoryXAxis"; import { PropertyMetadata } from "igniteui-react-core"; /** * @hidden */ export let HorizontalAnchoredCategorySeries = /*@__PURE__*/ (() => { class HorizontalAnchoredCategorySeries extends AnchoredCategorySeries { constructor() { super(...arguments); this.ac9 = null; this.ac5 = null; this.adb = null; this.ac7 = 0; } get ada() { if (this.ac9 == null) { this.ac9 = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n); } return this.ac9; } ph() { super.ph(); this.xAxis = null; this.yAxis = null; } cl() { return 1; } cm() { if (this.yAxis != null && this.yAxis.dn) { return 4; } return 3; } b3() { if (this.b4 == 0) { return 1; } else { return super.b3(); } } zi() { return this.ac5; } zz() { return this.adb; } xc(a) { if (this.zk == null || this.zk.s.count == 0 || !this.hasMarkers || !this.x3()) { return Rect.empty; } return this.ada.d$d(this, this.zk.s, a, runOn(this, this.adn)); } adn(a) { return this.abn.ds(a); } adf(a, b, c) { return this.ada.d$c(this, this.zz(), a, b, c); } aj(a) { return this.ada.d$a(this, this.zk.k, this.aal(this.cw), this.aam(this.cw), a); } al(a) { return this.ada.d$b(this, this.zk.k, this.aal(this.cw), this.aam(this.cw), a); } g4(a, b) { if (this.g3(a, b)) { return true; } if (this.x4(a, b)) { return true; } return false; } getOffsetValue() { return this.zp.r(this.zi(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); } getCategoryWidth() { let a = this.getEffectiveViewport1(this.cw); return this.zi().getCategorySize(this.cw.ca, this.cw.b9, a); } jf(a, b, c) { if (this.dc == null) { return NaN; } let d = this.getEffectiveViewport1(this.cw); let e = this.zi(); if (e == null) { return NaN; } let f = new ScalerParams(0, this.dc.yv, this.cw.b9, e.dn, d); let g = this.zp.r(e, this.dc.yv, this.cw.b9, d); return this.jh(this.valueColumn, a, e, f, g, runOn(this, this.aaj), b, c); } kl(a, b) { return this.km(a, b, this.zi(), runOn(this, this.aaj), this.valueColumn); } kj(a, b) { return this.kk(a, b, this.zi(), runOn(this, this.aaj), this.valueColumn); } iy(a, b, c, d, e) { if (this.valueColumn == null) { return Number.POSITIVE_INFINITY; } return this.iz(a, b, this.zi(), d, e, this.valueColumn.count, runOn(this, this.aaj)); } wy(a, b, c) { if (this.zi() == null || this.zz() == null) { return { $type: Point_$type, x: NaN, y: NaN }; } return this.w0(a, b, c, this.zp.r(this.zi(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.zz(), this.zi(), null, null, null); } fetchXAxis() { return this.ac5; } fetchYAxis() { return this.adb; } acj(a) { this.xAxis = typeCast(CategoryAxisBase.$, a); } ack(a) { this.yAxis = typeCast(NumericYAxis.$, a); } aaf() { return this.adb != null && this.adb.ee(); } adj(a) { this.ac5 = a; } adk(a) { this.adb = a; } zc(a, b) { return this.abk(a, b, this.ac5); } rs(a, b, c, d) { switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: this.adj(this.xAxis); if (this.abn.dl) { this.abn.dk = CategoryTrendLineManagerFactory.a(this.abn.dk, this.ac5, this.tf, this, this.ds); this.abn.dk.g$b = this.trendLineType; this.abn.dk.g$f = this.trendLinePeriod; } break; case "TrendLineType": let e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.abn.dk = CategoryTrendLineManagerFactory.a(this.abn.dk, this.ac5, this.tf, this, this.ds); this.abn.dk.g$b = this.trendLineType; this.abn.dk.g$f = this.trendLinePeriod; } break; } super.rs(a, b, c, d); switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: if (c != d) { this.pr(typeCast(Axis.$, c)); this.r0(typeCast(Axis.$, d)); this.adj(this.xAxis); this.zt.c9.g(this.im); this.sa(false); this.q2(); } break; case HorizontalAnchoredCategorySeries.$$p[1]: if (c != d) { this.pr(typeCast(Axis.$, c)); this.r0(typeCast(Axis.$, d)); this.adk(this.yAxis); if (this.dc != null) { this.dc.ps(); } this.zt.c9.g(this.im); this.aaf(); this.sa(false); this.q2(); } break; case "CategoryMode": if (this.xAxis != null) { this.xAxis.q5(true); } break; } } pq(a, b, c, d) { super.pq(a, b, c, d); if (this.ac5 != null && typeCast(ISortingAxis_$type, this.ac5) !== null) { this.ac5.i$i(); } switch (a) { case 4: if (this.ac5 != null) { this.ac5.ee(); } if (this.adb != null && !this.adb.ee()) { this.sa(true); } break; case 1: if (this.ac5 != null) { this.ac5.ee(); } if (this.adb != null && !this.adb.ee()) { this.sa(true); } break; case 0: if (this.ac5 != null) { this.ac5.ee(); } if (this.adb != null && !this.adb.ee()) { this.sa(true); } break; case 2: if (this.ab5 != null && this.abn.c9.d > 0 && this.adb != null && !this.adb.ee()) { this.sa(true); } break; case 3: if (d == this.ab5) { if (this.ac5 != null) { this.ac5.ee(); } if (this.adb != null && !this.adb.ee()) { this.sa(true); } } break; } } add(a) { if (typeCast(CategoryXAxis.$, a) !== null || a.dj) { return true; } return false; } ade(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } get ac8() { return this.ac7; } set ac8(a) { let b = this.ac8; if (a != b) { this.ac7 = a; this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.ac8)); } } get useHighMarkerFidelity() { return this.aag; } } HorizontalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$); HorizontalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::adl', [CategoryAxisBase.$, null], 'YAxis::adm', [NumericYAxis.$, null]]); return HorizontalAnchoredCategorySeries; })();