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.acl = null; this.ach = null; this.acn = null; this.acj = 0; } get acm() { if (this.acl == null) { this.acl = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n); } return this.acl; } 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.ach; } ze() { return this.acn; } wu(a) { if (this.yz == null || this.yz.p.count == 0 || !this.hasMarkers || !this.xl()) { return Rect.empty; } return this.acm.d$d(this, this.yz.p, a, runOn(this, this.acz)); } acz(a) { return this.aaz.ds(a); } acr(a, b, c) { return this.acm.d$c(this, this.ze(), a, b, c); } aj(a) { return this.acm.d$a(this, this.yz.h, this.z0(this.cw), this.z1(this.cw), a); } al(a) { return this.acm.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.wh, this.cw.b9, e.ch, d); let g = this.y4.r(e, this.dc.wh, 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.ach; } fetchYAxis() { return this.acn; } abv(a) { this.xAxis = typeCast(CategoryAxisBase.$, a); } abw(a) { this.yAxis = typeCast(NumericYAxis.$, a); } zu() { return this.acn != null && this.acn.c1(); } acv(a) { this.ach = a; } acw(a) { this.acn = a; } yr(a, b) { return this.aaw(a, b, this.ach); } rc(a, b, c, d) { switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: this.acv(this.xAxis); if (this.aaz.dl) { this.aaz.dk = CategoryTrendLineManagerFactory.a(this.aaz.dk, this.ach, this.sz, this, this.ds); this.aaz.dk.g$b = this.trendLineType; this.aaz.dk.g$f = this.trendLinePeriod; } break; case "TrendLineType": let e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.aaz.dk = CategoryTrendLineManagerFactory.a(this.aaz.dk, this.ach, this.sz, this, this.ds); this.aaz.dk.g$b = this.trendLineType; this.aaz.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.acv(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.acw(this.yAxis); if (this.dc != null) { this.dc.ob(); } 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.ach != null && typeCast(ISortingAxis_$type, this.ach) !== null) { this.ach.i$i(); } switch (a) { case 4: if (this.ach != null) { this.ach.c1(); } if (this.acn != null && !this.acn.c1()) { this.ru(true); } break; case 1: if (this.ach != null) { this.ach.c1(); } if (this.acn != null && !this.acn.c1()) { this.ru(true); } break; case 0: if (this.ach != null) { this.ach.c1(); } if (this.acn != null && !this.acn.c1()) { this.ru(true); } break; case 2: if (this.abh != null && this.aaz.c9.d > 0 && this.acn != null && !this.acn.c1()) { this.ru(true); } break; case 3: if (d == this.abh) { if (this.ach != null) { this.ach.c1(); } if (this.acn != null && !this.acn.c1()) { this.ru(true); } } break; } } acp(a) { if (typeCast(CategoryXAxis.$, a) !== null || a.ce) { return true; } return false; } acq(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } get ack() { return this.acj; } set ack(a) { let b = this.ack; if (a != b) { this.acj = a; this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.ack)); } } get useHighMarkerFidelity() { return this.zv; } } HorizontalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$); HorizontalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::acx', [CategoryAxisBase.$, null], 'YAxis::acy', [NumericYAxis.$, null]]); return HorizontalAnchoredCategorySeries; })();