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.ace = null;
}
ck() {
if (this.xAxis != null && this.xAxis.ch) {
return 4;
}
return 3;
}
cl() {
return 1;
}
o2() {
super.o2();
this.xAxis = null;
this.yAxis = null;
}
get acf() {
if (this.ace == null) {
this.ace = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, () => this.dr.n);
}
return this.ace;
}
get_isVertical() {
return true;
}
ys() {
return this.yAxis;
}
y9() {
return this.xAxis;
}
getOffsetValue() {
return this.yz.r(this.ys(), 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));
}
j8(a, b) {
return this.j9(a, b, this.ys(), runOn(this, this.zt), this.valueColumn);
}
ka(a, b) {
return this.kb(a, b, this.ys(), runOn(this, this.zt), this.valueColumn);
}
ip(a, b, c, d, e) {
if (this.valueColumn == null) {
return Number.POSITIVE_INFINITY;
}
return this.iq(a, b, this.yAxis, d, e, this.valueColumn.count, runOn(this, this.zt));
}
az(a) {
if (a.isEmpty && this.db != null) {
a = this.db.v4;
}
if (this.valueColumn == null) {
return null;
}
let b = this.wj(this.cv);
let c = this.ys();
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.abb;
f += this.abb;
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.y9(), a);
return n;
}
b2() {
if (this.b3 == 0) {
return 1;
}
else {
return super.b2();
}
}
wp(a) {
if (!this.hasMarkers || !this.xg()) {
return Rect.empty;
}
return this.acf.e$b(this, this.yu.n, a, runOn(this, this.acn));
}
acn(a) {
return this.aav.de(a);
}
gw(a, b) {
if (this.gv(a, b)) {
return true;
}
if (this.xh(a, b)) {
return true;
}
return false;
}
i5(a, b, c) {
if (this.db == null) {
return NaN;
}
let d = this.getEffectiveViewport1(this.cv);
let e = this.ys();
let f = new ScalerParams(0, this.db.v4, this.cv.bx, e.ch, d);
let g = this.yz.r(e, this.db.v4, this.cv.bx, d);
return this.i7(this.valueColumn, a, e, f, g, runOn(this, this.zt), b, c);
}
wc(a, b, c) {
let d = this.ys();
return this.we(a, b, c, this.yz.r(d, this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.y9(), d, null, null, null);
}
fetchXAxis() {
return this.xAxis;
}
fetchYAxis() {
return this.yAxis;
}
abr(a) {
this.xAxis = typeCast(NumericXAxis.$, a);
}
abs(a) {
this.yAxis = typeCast(CategoryYAxis.$, a);
}
zp() {
return this.xAxis != null && this.xAxis.c1();
}
ym(a, b) {
return this.aas(a, b, this.yAxis);
}
ir(a) {
return this.acf.e$a(this, a);
}
zt(a) {
return this.it(a, this.ys());
}
j3(a) {
return truncate(Math.round(this.ir(a)));
}
kn(a) {
let b = this.j3(a);
return b >= 0 && this.dn != null && b < this.dn.count ? this.dn.item(b) : null;
}
q9(a, b, c, d) {
super.q9(a, b, c, d);
switch (b) {
case VerticalAnchoredCategorySeries.$$p[0]:
if (c != d) {
this.pc(typeCast(Axis.$, c));
this.rh(typeCast(Axis.$, d));
this.y3.cw.g(this.id);
if (this.db != null) {
this.db.n2();
}
this.rr(false);
this.ql();
}
break;
case VerticalAnchoredCategorySeries.$$p[1]:
if (c != d) {
this.pc(typeCast(Axis.$, c));
this.rh(typeCast(Axis.$, d));
this.y3.cw.g(this.id);
this.zp();
this.rr(false);
this.ql();
}
break;
case "TrendLineType":
let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
if (e != 0) {
this.aav.c7 = CategoryTrendLineManagerFactory.a(this.aav.c7, this.yAxis, this.sv, this, this.dr);
}
break;
}
}
aci(a) {
if (typeCast(CategoryYAxis.$, a) !== null) {
return true;
}
return false;
}
ach(a) {
if (typeCast(NumericXAxis.$, a) !== null) {
return true;
}
return false;
}
get useHighMarkerFidelity() {
return this.zq;
}
}
VerticalAnchoredCategorySeries.$t = markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$);
VerticalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::acl', [NumericXAxis.$, null], 'YAxis::acm', [CategoryYAxis.$, null]]);
return VerticalAnchoredCategorySeries;
})();