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.aco = null; this.ack = null; this.acq = null; this.acm = 0; } get acp() { if (this.aco == null) { this.aco = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n); } return this.aco; } o4() { super.o4(); this.xAxis = null; this.yAxis = null; } cl() { return 1; } cm() { if (this.yAxis != null && this.yAxis.ch) { return 4; } return 3; } b3() { if (this.b4 == 0) { return 1; } else { return super.b3(); } } yx() { return this.ack; } ze() { return this.acq; } wu(a) { if (this.yz == null || this.yz.p.count == 0 || !this.hasMarkers || !this.xl()) { return Rect.empty; } return this.acp.d$d(this, this.yz.p, a, runOn(this, this.ac2)); } ac2(a) { return this.aa2.ds(a); } acu(a, b, c) { return this.acp.d$c(this, this.ze(), a, b, c); } aj(a) { return this.acp.d$a(this, this.yz.h, this.z0(this.cw), this.z1(this.cw), a); } al(a) { return this.acp.d$b(this, this.yz.h, this.z0(this.cw), this.z1(this.cw), a); } gx(a, b) { if (this.gw(a, b)) { return true; } if (this.xm(a, b)) { return true; } return false; } getOffsetValue() { return this.y4.r(this.yx(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); } getCategoryWidth() { let a = this.getEffectiveViewport1(this.cw); return this.yx().getCategorySize(this.cw.ca, this.cw.b9, a); } i6(a, b, c) { if (this.dc == null) { return NaN; } let d = this.getEffectiveViewport1(this.cw); let e = this.yx(); if (e == null) { return NaN; } 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); } kb(a, b) { return this.kc(a, b, this.yx(), runOn(this, this.zy), this.valueColumn); } j9(a, b) { return this.ka(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.yx(), d, e, this.valueColumn.count, runOn(this, this.zy)); } wh(a, b, c) { if (this.yx() == null || this.ze() == null) { return { $type: Point_$type, x: NaN, y: NaN }; } return this.wj(a, b, c, this.y4.r(this.yx(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ze(), this.yx(), null, null, null); } fetchXAxis() { return this.ack; } fetchYAxis() { return this.acq; } aby(a) { this.xAxis = typeCast(CategoryAxisBase.$, a); } abz(a) { this.yAxis = typeCast(NumericYAxis.$, a); } zu() { return this.acq != null && this.acq.c1(); } acy(a) { this.ack = a; } acz(a) { this.acq = a; } yr(a, b) { return this.aaz(a, b, this.ack); } rc(a, b, c, d) { switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: this.acy(this.xAxis); if (this.aa2.dl) { this.aa2.dk = CategoryTrendLineManagerFactory.a(this.aa2.dk, this.ack, this.sz, this, this.ds); this.aa2.dk.g$b = this.trendLineType; this.aa2.dk.g$f = this.trendLinePeriod; } break; case "TrendLineType": let e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.aa2.dk = CategoryTrendLineManagerFactory.a(this.aa2.dk, this.ack, this.sz, this, this.ds); this.aa2.dk.g$b = this.trendLineType; this.aa2.dk.g$f = this.trendLinePeriod; } break; } super.rc(a, b, c, d); switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: if (c != d) { this.pe(typeCast(Axis.$, c)); this.rk(typeCast(Axis.$, d)); this.acy(this.xAxis); this.y8.c9.g(this.ie); this.ru(false); this.qn(); } break; case HorizontalAnchoredCategorySeries.$$p[1]: if (c != d) { this.pe(typeCast(Axis.$, c)); this.rk(typeCast(Axis.$, d)); this.acz(this.yAxis); if (this.dc != null) { this.dc.ok(); } this.y8.c9.g(this.ie); this.zu(); this.ru(false); this.qn(); } break; case "CategoryMode": if (this.xAxis != null) { this.xAxis.ma(true); } break; } } pd(a, b, c, d) { super.pd(a, b, c, d); if (this.ack != null && typeCast(ISortingAxis_$type, this.ack) !== null) { this.ack.i$i(); } switch (a) { case 4: if (this.ack != null) { this.ack.c1(); } if (this.acq != null && !this.acq.c1()) { this.ru(true); } break; case 1: if (this.ack != null) { this.ack.c1(); } if (this.acq != null && !this.acq.c1()) { this.ru(true); } break; case 0: if (this.ack != null) { this.ack.c1(); } if (this.acq != null && !this.acq.c1()) { this.ru(true); } break; case 2: if (this.abk != null && this.aa2.c9.d > 0 && this.acq != null && !this.acq.c1()) { this.ru(true); } break; case 3: if (d == this.abk) { if (this.ack != null) { this.ack.c1(); } if (this.acq != null && !this.acq.c1()) { this.ru(true); } } break; } } acs(a) { if (typeCast(CategoryXAxis.$, a) !== null || a.ce) { return true; } return false; } act(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } get acn() { return this.acm; } set acn(a) { let b = this.acn; if (a != b) { this.acm = a; this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.acn)); } } get useHighMarkerFidelity() { return this.zv; } } HorizontalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$); HorizontalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::ac0', [CategoryAxisBase.$, null], 'YAxis::ac1', [NumericYAxis.$, null]]); return HorizontalAnchoredCategorySeries; })();