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.acu = null; this.acq = null; this.acw = null; this.acs = 0; } get acv() { if (this.acu == null) { this.acu = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n); } return this.acu; } o8() { super.o8(); this.xAxis = null; this.yAxis = null; } cl() { return 1; } cm() { if (this.yAxis != null && this.yAxis.df) { return 4; } return 3; } b3() { if (this.b4 == 0) { return 1; } else { return super.b3(); } } y3() { return this.acq; } zk() { return this.acw; } w0(a) { if (this.y5 == null || this.y5.p.count == 0 || !this.hasMarkers || !this.xr()) { return Rect.empty; } return this.acv.d$d(this, this.y5.p, a, runOn(this, this.ac8)); } ac8(a) { return this.aa8.ds(a); } ac0(a, b, c) { return this.acv.d$c(this, this.zk(), a, b, c); } aj(a) { return this.acv.d$a(this, this.y5.h, this.z6(this.cw), this.z7(this.cw), a); } al(a) { return this.acv.d$b(this, this.y5.h, this.z6(this.cw), this.z7(this.cw), a); } gx(a, b) { if (this.gw(a, b)) { return true; } if (this.xs(a, b)) { return true; } return false; } getOffsetValue() { return this.za.r(this.y3(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); } getCategoryWidth() { let a = this.getEffectiveViewport1(this.cw); return this.y3().getCategorySize(this.cw.ca, this.cw.b9, a); } i8(a, b, c) { if (this.dc == null) { return NaN; } let d = this.getEffectiveViewport1(this.cw); let e = this.y3(); if (e == null) { return NaN; } let f = new ScalerParams(0, this.dc.xn, this.cw.b9, e.df, d); let g = this.za.r(e, this.dc.xn, this.cw.b9, d); return this.ja(this.valueColumn, a, e, f, g, runOn(this, this.z4), b, c); } ke(a, b) { return this.kf(a, b, this.y3(), runOn(this, this.z4), this.valueColumn); } kc(a, b) { return this.kd(a, b, this.y3(), runOn(this, this.z4), this.valueColumn); } ir(a, b, c, d, e) { if (this.valueColumn == null) { return Number.POSITIVE_INFINITY; } return this.is(a, b, this.y3(), d, e, this.valueColumn.count, runOn(this, this.z4)); } wn(a, b, c) { if (this.y3() == null || this.zk() == null) { return { $type: Point_$type, x: NaN, y: NaN }; } return this.wp(a, b, c, this.za.r(this.y3(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.zk(), this.y3(), null, null, null); } fetchXAxis() { return this.acq; } fetchYAxis() { return this.acw; } ab4(a) { this.xAxis = typeCast(CategoryAxisBase.$, a); } ab5(a) { this.yAxis = typeCast(NumericYAxis.$, a); } z0() { return this.acw != null && this.acw.d2(); } ac4(a) { this.acq = a; } ac5(a) { this.acw = a; } yx(a, b) { return this.aa5(a, b, this.acq); } rh(a, b, c, d) { switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: this.ac4(this.xAxis); if (this.aa8.dl) { this.aa8.dk = CategoryTrendLineManagerFactory.a(this.aa8.dk, this.acq, this.s4, this, this.ds); this.aa8.dk.g$b = this.trendLineType; this.aa8.dk.g$f = this.trendLinePeriod; } break; case "TrendLineType": let e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.aa8.dk = CategoryTrendLineManagerFactory.a(this.aa8.dk, this.acq, this.s4, this, this.ds); this.aa8.dk.g$b = this.trendLineType; this.aa8.dk.g$f = this.trendLinePeriod; } break; } super.rh(a, b, c, d); switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: if (c != d) { this.pi(typeCast(Axis.$, c)); this.rp(typeCast(Axis.$, d)); this.ac4(this.xAxis); this.ze.c9.g(this.ie); this.rz(false); this.qs(); } break; case HorizontalAnchoredCategorySeries.$$p[1]: if (c != d) { this.pi(typeCast(Axis.$, c)); this.rp(typeCast(Axis.$, d)); this.ac5(this.yAxis); if (this.dc != null) { this.dc.o1(); } this.ze.c9.g(this.ie); this.z0(); this.rz(false); this.qs(); } break; case "CategoryMode": if (this.xAxis != null) { this.xAxis.pw(true); } break; } } ph(a, b, c, d) { super.ph(a, b, c, d); if (this.acq != null && typeCast(ISortingAxis_$type, this.acq) !== null) { this.acq.i$i(); } switch (a) { case 4: if (this.acq != null) { this.acq.d2(); } if (this.acw != null && !this.acw.d2()) { this.rz(true); } break; case 1: if (this.acq != null) { this.acq.d2(); } if (this.acw != null && !this.acw.d2()) { this.rz(true); } break; case 0: if (this.acq != null) { this.acq.d2(); } if (this.acw != null && !this.acw.d2()) { this.rz(true); } break; case 2: if (this.abq != null && this.aa8.c9.d > 0 && this.acw != null && !this.acw.d2()) { this.rz(true); } break; case 3: if (d == this.abq) { if (this.acq != null) { this.acq.d2(); } if (this.acw != null && !this.acw.d2()) { this.rz(true); } } break; } } acy(a) { if (typeCast(CategoryXAxis.$, a) !== null || a.dc) { return true; } return false; } acz(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } get act() { return this.acs; } set act(a) { let b = this.act; if (a != b) { this.acs = a; this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.act)); } } get useHighMarkerFidelity() { return this.z1; } } HorizontalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$); HorizontalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::ac6', [CategoryAxisBase.$, null], 'YAxis::ac7', [NumericYAxis.$, null]]); return HorizontalAnchoredCategorySeries; })();