UNPKG

igniteui-react-charts

Version:

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

283 lines (282 loc) 10.4 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.aci = null; this.ace = null; this.ack = null; this.acg = 0; } get acj() { if (this.aci == null) { this.aci = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n); } return this.aci; } o2() { super.o2(); 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(); } } yu() { return this.ace; } zb() { return this.ack; } wr(a) { if (this.yw == null || this.yw.p.count == 0 || !this.hasMarkers || !this.xi()) { return Rect.empty; } return this.acj.d$d(this, this.yw.p, a, runOn(this, this.acw)); } acw(a) { return this.aaw.di(a); } aco(a, b, c) { return this.acj.d$c(this, this.zb(), a, b, c); } aj(a) { return this.acj.d$a(this, this.yw.h, this.zx(this.cw), this.zy(this.cw), a); } al(a) { return this.acj.d$b(this, this.yw.h, this.zx(this.cw), this.zy(this.cw), a); } gw(a, b) { if (this.gv(a, b)) { return true; } if (this.xj(a, b)) { return true; } return false; } getOffsetValue() { return this.y1.r(this.yu(), this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)); } getCategoryWidth() { let a = this.getEffectiveViewport1(this.cw); return this.yu().getCategorySize(this.cw.b2, this.cw.b1, a); } i5(a, b, c) { if (this.dc == null) { return NaN; } let d = this.getEffectiveViewport1(this.cw); let e = this.yu(); if (e == null) { return NaN; } let f = new ScalerParams(0, this.dc.v5, this.cw.b1, e.ch, d); let g = this.y1.r(e, this.dc.v5, this.cw.b1, d); return this.i7(this.valueColumn, a, e, f, g, runOn(this, this.zv), b, c); } ka(a, b) { return this.kb(a, b, this.yu(), runOn(this, this.zv), this.valueColumn); } j8(a, b) { return this.j9(a, b, this.yu(), runOn(this, this.zv), this.valueColumn); } ip(a, b, c, d, e) { if (this.valueColumn == null) { return Number.POSITIVE_INFINITY; } return this.iq(a, b, this.yu(), d, e, this.valueColumn.count, runOn(this, this.zv)); } we(a, b, c) { if (this.yu() == null || this.zb() == null) { return { $type: Point_$type, x: NaN, y: NaN }; } return this.wg(a, b, c, this.y1.r(this.yu(), this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)), this.zb(), this.yu(), null, null, null); } fetchXAxis() { return this.ace; } fetchYAxis() { return this.ack; } abs(a) { this.xAxis = typeCast(CategoryAxisBase.$, a); } abt(a) { this.yAxis = typeCast(NumericYAxis.$, a); } zr() { return this.ack != null && this.ack.c1(); } acs(a) { this.ace = a; } act(a) { this.ack = a; } yo(a, b) { return this.aat(a, b, this.ace); } ra(a, b, c, d) { switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: this.acs(this.xAxis); if (this.aaw.dc) { this.aaw.db = CategoryTrendLineManagerFactory.a(this.aaw.db, this.ace, this.sx, this, this.ds); } break; case "TrendLineType": let e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.aaw.db = CategoryTrendLineManagerFactory.a(this.aaw.db, this.ace, this.sx, this, this.ds); } break; } super.ra(a, b, c, d); switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: if (c != d) { this.pc(typeCast(Axis.$, c)); this.ri(typeCast(Axis.$, d)); this.acs(this.xAxis); this.y5.c0.g(this.id); this.rs(false); this.ql(); } break; case HorizontalAnchoredCategorySeries.$$p[1]: if (c != d) { this.pc(typeCast(Axis.$, c)); this.ri(typeCast(Axis.$, d)); this.act(this.yAxis); if (this.dc != null) { this.dc.n3(); } this.y5.c0.g(this.id); this.zr(); this.rs(false); this.ql(); } break; case "CategoryMode": if (this.xAxis != null) { this.xAxis.ma(true); } break; } } pb(a, b, c, d) { super.pb(a, b, c, d); if (this.ace != null && typeCast(ISortingAxis_$type, this.ace) !== null) { this.ace.i$i(); } switch (a) { case 4: if (this.ace != null) { this.ace.c1(); } if (this.ack != null && !this.ack.c1()) { this.rs(true); } break; case 1: if (this.ace != null) { this.ace.c1(); } if (this.ack != null && !this.ack.c1()) { this.rs(true); } break; case 0: if (this.ace != null) { this.ace.c1(); } if (this.ack != null && !this.ack.c1()) { this.rs(true); } break; case 2: if (this.abe != null && this.aaw.c0.d > 0 && this.ack != null && !this.ack.c1()) { this.rs(true); } break; case 3: if (d == this.abe) { if (this.ace != null) { this.ace.c1(); } if (this.ack != null && !this.ack.c1()) { this.rs(true); } } break; } } acm(a) { if (typeCast(CategoryXAxis.$, a) !== null || a.ce) { return true; } return false; } acn(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } get ach() { return this.acg; } set ach(a) { let b = this.ach; if (a != b) { this.acg = a; this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.ach)); } } get useHighMarkerFidelity() { return this.zs; } } HorizontalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$); HorizontalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::acu', [CategoryAxisBase.$, null], 'YAxis::acv', [NumericYAxis.$, null]]); return HorizontalAnchoredCategorySeries; })();