igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
258 lines (257 loc) • 9.51 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 { NumericXAxis } from "./NumericXAxis";
import { DependencyProperty } from "igniteui-angular-core";
import { CategoryYAxis } from "./CategoryYAxis";
import { IVerticalAnchoredCategorySeriesInteractionManager_$type } from "./IVerticalAnchoredCategorySeriesInteractionManager";
import { DVContainer } from "igniteui-angular-core";
import { runOn, typeCast, EnumUtil, markType, markDep } from "igniteui-angular-core";
import { Axis } from "./Axis";
import { ScalerParams } from "./ScalerParams";
import { AxisRange } from "./AxisRange";
import { Rect } from "igniteui-angular-core";
import { TrendLineType_$type } from "igniteui-angular-core";
import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory";
import { PropertyMetadata } from "igniteui-angular-core";
import { truncate, isNaN_, isInfinity } from "igniteui-angular-core";
/**
* @hidden
*/
export let VerticalAnchoredCategorySeries = /*@__PURE__*/ (() => {
class VerticalAnchoredCategorySeries extends AnchoredCategorySeries {
constructor() {
super(...arguments);
this.acd = null;
}
ck() {
if (this.xAxis != null && this.xAxis.ch) {
return 4;
}
return 3;
}
cl() {
return 1;
}
o1() {
super.o1();
this.xAxis = null;
this.yAxis = null;
}
get ace() {
if (this.acd == null) {
this.acd = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, () => this.dr.n);
}
return this.acd;
}
get_isVertical() {
return true;
}
yr() {
return this.yAxis;
}
y8() {
return this.xAxis;
}
getOffsetValue() {
return this.yy.r(this.yr(), this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv));
}
getCategoryWidth() {
return this.yAxis.getCategorySize(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv));
}
j7(a, b) {
return this.j8(a, b, this.yr(), runOn(this, this.zs), this.valueColumn);
}
j9(a, b) {
return this.ka(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.yAxis, d, e, this.valueColumn.count, runOn(this, this.zs));
}
az(a) {
if (a.isEmpty && this.db != null) {
a = this.db.v4;
}
if (this.valueColumn == null) {
return null;
}
let b = this.wi(this.cv);
let c = this.yr();
let d = new ScalerParams(0, a, this.db.wk, c.ch, this.getEffectiveViewport());
let e = (c.eo(b.top, d));
let f = (c.eo(b.bottom, d));
if (!c.ch) {
let g = e;
e = f;
f = g;
}
e -= this.aba;
f += this.aba;
let h = null;
if (c.cn) {
h = c;
e = h.i$f(e);
f = h.i$f(f);
}
else {
e = Math.floor(e);
f = Math.ceil(f);
}
if (isNaN_(e) || isNaN_(f)) {
return null;
}
e = Math.max(0, Math.min(this.valueColumn.count - 1, e));
f = Math.max(0, Math.min(this.valueColumn.count - 1, f));
let i = 1.7976931348623157E+308;
let j = -1.7976931348623157E+308;
if (truncate(e) <= truncate(f)) {
for (let k = truncate(e); k <= truncate(f); k++) {
let l = k;
if (h != null) {
l = h.i$b._inner[k];
}
let m = this.valueColumn.item(l);
if (this.valueColumn.mayContainUnknowns) {
if (isInfinity(m) || isNaN_(m)) {
continue;
}
}
i = Math.min(i, m);
j = Math.max(j, m);
}
}
let n = new AxisRange(i, j);
n = this.ax(n, this.y8(), a);
return n;
}
b2() {
if (this.b3 == 0) {
return 1;
}
else {
return super.b2();
}
}
wo(a) {
if (!this.hasMarkers || !this.xf()) {
return Rect.empty;
}
return this.ace.e$b(this, this.yt.n, a, runOn(this, this.acm));
}
acm(a) {
return this.aau.de(a);
}
gv(a, b) {
if (this.gu(a, b)) {
return true;
}
if (this.xg(a, b)) {
return true;
}
return false;
}
i4(a, b, c) {
if (this.db == null) {
return NaN;
}
let d = this.getEffectiveViewport1(this.cv);
let e = this.yr();
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);
}
wb(a, b, c) {
let d = this.yr();
return this.wd(a, b, c, this.yy.r(d, this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.y8(), d, null, null, null);
}
fetchXAxis() {
return this.xAxis;
}
fetchYAxis() {
return this.yAxis;
}
abq(a) {
this.xAxis = typeCast(NumericXAxis.$, a);
}
abr(a) {
this.yAxis = typeCast(CategoryYAxis.$, a);
}
zo() {
return this.xAxis != null && this.xAxis.c1();
}
yl(a, b) {
return this.aar(a, b, this.yAxis);
}
iq(a) {
return this.ace.e$a(this, a);
}
zs(a) {
return this.is(a, this.yr());
}
j2(a) {
return truncate(Math.round(this.iq(a)));
}
km(a) {
let b = this.j2(a);
return b >= 0 && this.dn != null && b < this.dn.count ? this.dn.item(b) : null;
}
q8(a, b, c, d) {
super.q8(a, b, c, d);
switch (b) {
case VerticalAnchoredCategorySeries.$$p[0]:
if (c != d) {
this.pb(typeCast(Axis.$, c));
this.rg(typeCast(Axis.$, d));
this.y2.cw.g(this.ic);
if (this.db != null) {
this.db.n2();
}
this.rq(false);
this.qk();
}
break;
case VerticalAnchoredCategorySeries.$$p[1]:
if (c != d) {
this.pb(typeCast(Axis.$, c));
this.rg(typeCast(Axis.$, d));
this.y2.cw.g(this.ic);
this.zo();
this.rq(false);
this.qk();
}
break;
case "TrendLineType":
let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
if (e != 0) {
this.aau.c7 = CategoryTrendLineManagerFactory.a(this.aau.c7, this.yAxis, this.su, this, this.dr);
}
break;
}
}
ach(a) {
if (typeCast(CategoryYAxis.$, a) !== null) {
return true;
}
return false;
}
acg(a) {
if (typeCast(NumericXAxis.$, a) !== null) {
return true;
}
return false;
}
get useHighMarkerFidelity() {
return this.zp;
}
}
VerticalAnchoredCategorySeries.$t = markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$);
VerticalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::ack', [NumericXAxis.$, null], 'YAxis::acl', [CategoryYAxis.$, null]]);
return VerticalAnchoredCategorySeries;
})();