igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
283 lines (282 loc) • 10.7 kB
JavaScript
/*
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 let HorizontalAnchoredCategorySeries = /*@__PURE__*/ (() => {
class HorizontalAnchoredCategorySeries extends AnchoredCategorySeries {
constructor() {
super(...arguments);
this.acg = null;
this.acc = null;
this.aci = null;
this.ace = 0;
}
get ach() {
if (this.acg == null) {
this.acg = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.dr.n);
}
return this.acg;
}
o1() {
super.o1();
this.xAxis = null;
this.yAxis = null;
}
ck() {
return 1;
}
cl() {
if (this.yAxis != null && this.yAxis.ch) {
return 4;
}
return 3;
}
b2() {
if (this.b3 == 0) {
return 1;
}
else {
return super.b2();
}
}
yr() {
return this.acc;
}
y8() {
return this.aci;
}
wo(a) {
if (this.yt == null || this.yt.n.count == 0 || !this.hasMarkers || !this.xf()) {
return Rect.empty;
}
return this.ach.d$d(this, this.yt.n, a, runOn(this, this.acu));
}
acu(a) {
return this.aau.de(a);
}
acm(a, b, c) {
return this.ach.d$c(this, this.y8(), a, b, c);
}
aj(a) {
return this.ach.d$a(this, this.yt.f, this.zu(this.cv), this.zv(this.cv), a);
}
al(a) {
return this.ach.d$b(this, this.yt.f, this.zu(this.cv), this.zv(this.cv), a);
}
gv(a, b) {
if (this.gu(a, b)) {
return true;
}
if (this.xg(a, b)) {
return true;
}
return false;
}
getOffsetValue() {
return this.yy.r(this.yr(), this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv));
}
getCategoryWidth() {
let a = this.getEffectiveViewport1(this.cv);
return this.yr().getCategorySize(this.cv.by, this.cv.bx, a);
}
i4(a, b, c) {
if (this.db == null) {
return NaN;
}
let d = this.getEffectiveViewport1(this.cv);
let e = this.yr();
if (e == null) {
return NaN;
}
let f = new ScalerParams(0, this.db.v4, this.cv.bx, e.ch, d);
let g = this.yy.r(e, this.db.v4, this.cv.bx, d);
return this.i6(this.valueColumn, a, e, f, g, runOn(this, this.zs), b, c);
}
j9(a, b) {
return this.ka(a, b, this.yr(), runOn(this, this.zs), this.valueColumn);
}
j7(a, b) {
return this.j8(a, b, this.yr(), runOn(this, this.zs), this.valueColumn);
}
io(a, b, c, d, e) {
if (this.valueColumn == null) {
return Number.POSITIVE_INFINITY;
}
return this.ip(a, b, this.yr(), d, e, this.valueColumn.count, runOn(this, this.zs));
}
wb(a, b, c) {
if (this.yr() == null || this.y8() == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
return this.wd(a, b, c, this.yy.r(this.yr(), this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.y8(), this.yr(), null, null, null);
}
fetchXAxis() {
return this.acc;
}
fetchYAxis() {
return this.aci;
}
abq(a) {
this.xAxis = typeCast(CategoryAxisBase.$, a);
}
abr(a) {
this.yAxis = typeCast(NumericYAxis.$, a);
}
zo() {
return this.aci != null && this.aci.c1();
}
acq(a) {
this.acc = a;
}
acr(a) {
this.aci = a;
}
yl(a, b) {
return this.aar(a, b, this.acc);
}
q8(a, b, c, d) {
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
this.acq(this.xAxis);
if (this.aau.c8) {
this.aau.c7 = CategoryTrendLineManagerFactory.a(this.aau.c7, this.acc, this.su, this, this.dr);
}
break;
case "TrendLineType":
let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
if (e != 0) {
this.aau.c7 = CategoryTrendLineManagerFactory.a(this.aau.c7, this.acc, this.su, this, this.dr);
}
break;
}
super.q8(a, b, c, d);
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
if (c != d) {
this.pb(typeCast(Axis.$, c));
this.rg(typeCast(Axis.$, d));
this.acq(this.xAxis);
this.y2.cw.g(this.ic);
this.rq(false);
this.qk();
}
break;
case HorizontalAnchoredCategorySeries.$$p[1]:
if (c != d) {
this.pb(typeCast(Axis.$, c));
this.rg(typeCast(Axis.$, d));
this.acr(this.yAxis);
if (this.db != null) {
this.db.n2();
}
this.y2.cw.g(this.ic);
this.zo();
this.rq(false);
this.qk();
}
break;
case "CategoryMode":
if (this.xAxis != null) {
this.xAxis.ma(true);
}
break;
}
}
pa(a, b, c, d) {
super.pa(a, b, c, d);
if (this.acc != null && typeCast(ISortingAxis_$type, this.acc) !== null) {
this.acc.i$i();
}
switch (a) {
case 4:
if (this.acc != null) {
this.acc.c1();
}
if (this.aci != null && !this.aci.c1()) {
this.rq(true);
}
break;
case 1:
if (this.acc != null) {
this.acc.c1();
}
if (this.aci != null && !this.aci.c1()) {
this.rq(true);
}
break;
case 0:
if (this.acc != null) {
this.acc.c1();
}
if (this.aci != null && !this.aci.c1()) {
this.rq(true);
}
break;
case 2:
if (this.abc != null && this.aau.cw.d > 0 && this.aci != null && !this.aci.c1()) {
this.rq(true);
}
break;
case 3:
if (d == this.abc) {
if (this.acc != null) {
this.acc.c1();
}
if (this.aci != null && !this.aci.c1()) {
this.rq(true);
}
}
break;
}
}
ack(a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.ce) {
return true;
}
return false;
}
acl(a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
}
get acf() {
return this.ace;
}
set acf(a) {
let b = this.acf;
if (a != b) {
this.ace = a;
this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.acf));
}
}
get useHighMarkerFidelity() {
return this.zp;
}
}
HorizontalAnchoredCategorySeries.$t = markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$);
HorizontalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::acs', [CategoryAxisBase.$, null], 'YAxis::act', [NumericYAxis.$, null]]);
return HorizontalAnchoredCategorySeries;
})();