UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

284 lines (283 loc) 9.5 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-angular-core"; import { runOn, Point_$type, typeCast, EnumUtil, enumGetBox, markType, markDep } from "igniteui-angular-core"; import { CategoryAxisBase } from "./CategoryAxisBase"; import { DependencyProperty } from "igniteui-angular-core"; import { NumericYAxis } from "./NumericYAxis"; import { CategoryMode_$type } from "./CategoryMode"; import { Axis } from "./Axis"; import { Rect } from "igniteui-angular-core"; import { ScalerParams } from "./ScalerParams"; import { TrendLineType_$type } from "igniteui-angular-core"; import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory"; import { ISortingAxis_$type } from "./ISortingAxis"; import { CategoryXAxis } from "./CategoryXAxis"; import { PropertyMetadata } from "igniteui-angular-core"; /** * @hidden */ export class HorizontalAnchoredCategorySeries extends AnchoredCategorySeries { constructor() { super(...arguments); this.adv = null; this.adr = null; this.adx = null; this.adt = 0; } static { this.$t = markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$); } get adw() { if (this.adv == null) { this.adv = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n); } return this.adv; } ph() { super.ph(); this.xAxis = null; this.yAxis = null; } cl() { return 1; } cm() { if (this.yAxis != null && this.yAxis.dr) { return 4; } return 3; } b3() { if (this.b4 == 0) { return 1; } else { return super.b3(); } } z4() { return this.adr; } aal() { return this.adx; } xc(a) { if (this.z6 == null || this.z6.s.count == 0 || !this.hasMarkers || !this.x4()) { return Rect.empty; } return this.adw.d$d(this, this.z6.s, a, runOn(this, this.ad9)); } ad9(a) { return this.ab9.ds(a); } ad1(a, b, c) { return this.adw.d$c(this, this.aal(), a, b, c); } aj(a) { return this.adw.d$a(this, this.z6.k, this.aa7(this.cw), this.aa8(this.cw), a); } al(a) { return this.adw.d$b(this, this.z6.k, this.aa7(this.cw), this.aa8(this.cw), a); } g4(a, b) { if (this.g3(a, b)) { return true; } if (this.x5(a, b)) { return true; } return false; } getOffsetValue() { return this.aab.r(this.z4(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); } getCategoryWidth() { let a = this.getEffectiveViewport1(this.cw); return this.z4().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.z4(); if (e == null) { return NaN; } let f = new ScalerParams(0, this.dc.yv, this.cw.b9, e.dr, d); let g = this.aab.r(e, this.dc.yv, this.cw.b9, d); return this.jh(this.valueColumn, a, e, f, g, runOn(this, this.aa5), b, c); } kl(a, b) { return this.km(a, b, this.z4(), runOn(this, this.aa5), this.valueColumn); } kj(a, b) { return this.kk(a, b, this.z4(), runOn(this, this.aa5), this.valueColumn); } iy(a, b, c, d, e) { if (this.valueColumn == null) { return Number.POSITIVE_INFINITY; } return this.iz(a, b, this.z4(), d, e, this.valueColumn.count, runOn(this, this.aa5)); } wy(a, b, c) { if (this.z4() == null || this.aal() == null) { return { $type: Point_$type, x: NaN, y: NaN }; } return this.w0(a, b, c, this.aab.r(this.z4(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.aal(), this.z4(), null, null, null); } fetchXAxis() { return this.adr; } fetchYAxis() { return this.adx; } ac5(a) { this.xAxis = typeCast(CategoryAxisBase.$, a); } ac6(a) { this.yAxis = typeCast(NumericYAxis.$, a); } aa1() { return this.adx != null && this.adx.ei(); } ad5(a) { this.adr = a; } ad6(a) { this.adx = a; } zy(a, b) { return this.ab6(a, b, this.adr); } rs(a, b, c, d) { switch (b) { case HorizontalAnchoredCategorySeries.$$p[0]: this.ad5(this.xAxis); if (this.ab9.dl) { this.ab9.dk = CategoryTrendLineManagerFactory.a(this.ab9.dk, this.adr, this.tf, this, this.ds); this.ab9.dk.g$b = this.trendLineType; this.ab9.dk.g$f = this.trendLinePeriod; } break; case "TrendLineType": let e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.ab9.dk = CategoryTrendLineManagerFactory.a(this.ab9.dk, this.adr, this.tf, this, this.ds); this.ab9.dk.g$b = this.trendLineType; this.ab9.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.ad5(this.xAxis); this.aaf.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.ad6(this.yAxis); if (this.dc != null) { this.dc.ps(); } this.aaf.c9.g(this.im); this.aa1(); this.sa(false); this.q2(); } break; case "CategoryMode": if (this.xAxis != null) { this.xAxis.rh(true); } break; } } pq(a, b, c, d) { super.pq(a, b, c, d); if (this.adr != null && typeCast(ISortingAxis_$type, this.adr) !== null) { this.adr.i$i(); } switch (a) { case 4: if (this.adr != null) { this.adr.ei(); } if (this.adx != null && !this.adx.ei()) { this.sa(true); } break; case 1: if (this.adr != null) { this.adr.ei(); } if (this.adx != null && !this.adx.ei()) { this.sa(true); } break; case 0: if (this.adr != null) { this.adr.ei(); } if (this.adx != null && !this.adx.ei()) { this.sa(true); } break; case 2: if (this.acr != null && this.ab9.c9.d > 0 && this.adx != null && !this.adx.ei()) { this.sa(true); } break; case 3: if (d == this.acr) { if (this.adr != null) { this.adr.ei(); } if (this.adx != null && !this.adx.ei()) { this.sa(true); } } break; } } adz(a) { if (typeCast(CategoryXAxis.$, a) !== null || a.dm) { return true; } return false; } ad0(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } get adu() { return this.adt; } set adu(a) { let b = this.adu; if (a != b) { this.adt = a; this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.adu)); } } get useHighMarkerFidelity() { return this.aa2; } static { this.$$p = markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::ad7', [CategoryAxisBase.$, null], 'YAxis::ad8', [NumericYAxis.$, null]]); } }