igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
287 lines (286 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-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.ac5 = null;
this.ac1 = null;
this.ac7 = null;
this.ac3 = 0;
}
get ac6() {
if (this.ac5 == null) {
this.ac5 = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n);
}
return this.ac5;
}
pg() {
super.pg();
this.xAxis = null;
this.yAxis = null;
}
cl() {
return 1;
}
cm() {
if (this.yAxis != null && this.yAxis.dn) {
return 4;
}
return 3;
}
b3() {
if (this.b4 == 0) {
return 1;
}
else {
return super.b3();
}
}
ze() {
return this.ac1;
}
zv() {
return this.ac7;
}
xb(a) {
if (this.zg == null || this.zg.s.count == 0 || !this.hasMarkers || !this.x2()) {
return Rect.empty;
}
return this.ac6.d$d(this, this.zg.s, a, runOn(this, this.adj));
}
adj(a) {
return this.abj.ds(a);
}
adb(a, b, c) {
return this.ac6.d$c(this, this.zv(), a, b, c);
}
aj(a) {
return this.ac6.d$a(this, this.zg.k, this.aah(this.cw), this.aai(this.cw), a);
}
al(a) {
return this.ac6.d$b(this, this.zg.k, this.aah(this.cw), this.aai(this.cw), a);
}
g3(a, b) {
if (this.g2(a, b)) {
return true;
}
if (this.x3(a, b)) {
return true;
}
return false;
}
getOffsetValue() {
return this.zl.r(this.ze(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
}
getCategoryWidth() {
let a = this.getEffectiveViewport1(this.cw);
return this.ze().getCategorySize(this.cw.ca, this.cw.b9, a);
}
je(a, b, c) {
if (this.dc == null) {
return NaN;
}
let d = this.getEffectiveViewport1(this.cw);
let e = this.ze();
if (e == null) {
return NaN;
}
let f = new ScalerParams(0, this.dc.ys, this.cw.b9, e.dn, d);
let g = this.zl.r(e, this.dc.ys, this.cw.b9, d);
return this.jg(this.valueColumn, a, e, f, g, runOn(this, this.aaf), b, c);
}
kk(a, b) {
return this.kl(a, b, this.ze(), runOn(this, this.aaf), this.valueColumn);
}
ki(a, b) {
return this.kj(a, b, this.ze(), runOn(this, this.aaf), this.valueColumn);
}
ix(a, b, c, d, e) {
if (this.valueColumn == null) {
return Number.POSITIVE_INFINITY;
}
return this.iy(a, b, this.ze(), d, e, this.valueColumn.count, runOn(this, this.aaf));
}
wx(a, b, c) {
if (this.ze() == null || this.zv() == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
return this.wz(a, b, c, this.zl.r(this.ze(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.zv(), this.ze(), null, null, null);
}
fetchXAxis() {
return this.ac1;
}
fetchYAxis() {
return this.ac7;
}
acf(a) {
this.xAxis = typeCast(CategoryAxisBase.$, a);
}
acg(a) {
this.yAxis = typeCast(NumericYAxis.$, a);
}
aab() {
return this.ac7 != null && this.ac7.ee();
}
adf(a) {
this.ac1 = a;
}
adg(a) {
this.ac7 = a;
}
y8(a, b) {
return this.abg(a, b, this.ac1);
}
rr(a, b, c, d) {
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
this.adf(this.xAxis);
if (this.abj.dl) {
this.abj.dk = CategoryTrendLineManagerFactory.a(this.abj.dk, this.ac1, this.te, this, this.ds);
this.abj.dk.g$b = this.trendLineType;
this.abj.dk.g$f = this.trendLinePeriod;
}
break;
case "TrendLineType":
let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
if (e != 0) {
this.abj.dk = CategoryTrendLineManagerFactory.a(this.abj.dk, this.ac1, this.te, this, this.ds);
this.abj.dk.g$b = this.trendLineType;
this.abj.dk.g$f = this.trendLinePeriod;
}
break;
}
super.rr(a, b, c, d);
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
if (c != d) {
this.pq(typeCast(Axis.$, c));
this.rz(typeCast(Axis.$, d));
this.adf(this.xAxis);
this.zp.c9.g(this.il);
this.r9(false);
this.q1();
}
break;
case HorizontalAnchoredCategorySeries.$$p[1]:
if (c != d) {
this.pq(typeCast(Axis.$, c));
this.rz(typeCast(Axis.$, d));
this.adg(this.yAxis);
if (this.dc != null) {
this.dc.pr();
}
this.zp.c9.g(this.il);
this.aab();
this.r9(false);
this.q1();
}
break;
case "CategoryMode":
if (this.xAxis != null) {
this.xAxis.q3(true);
}
break;
}
}
pp(a, b, c, d) {
super.pp(a, b, c, d);
if (this.ac1 != null && typeCast(ISortingAxis_$type, this.ac1) !== null) {
this.ac1.i$i();
}
switch (a) {
case 4:
if (this.ac1 != null) {
this.ac1.ee();
}
if (this.ac7 != null && !this.ac7.ee()) {
this.r9(true);
}
break;
case 1:
if (this.ac1 != null) {
this.ac1.ee();
}
if (this.ac7 != null && !this.ac7.ee()) {
this.r9(true);
}
break;
case 0:
if (this.ac1 != null) {
this.ac1.ee();
}
if (this.ac7 != null && !this.ac7.ee()) {
this.r9(true);
}
break;
case 2:
if (this.ab1 != null && this.abj.c9.d > 0 && this.ac7 != null && !this.ac7.ee()) {
this.r9(true);
}
break;
case 3:
if (d == this.ab1) {
if (this.ac1 != null) {
this.ac1.ee();
}
if (this.ac7 != null && !this.ac7.ee()) {
this.r9(true);
}
}
break;
}
}
ac9(a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.dj) {
return true;
}
return false;
}
ada(a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
}
get ac4() {
return this.ac3;
}
set ac4(a) {
let b = this.ac4;
if (a != b) {
this.ac3 = a;
this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.ac4));
}
}
get useHighMarkerFidelity() {
return this.aac;
}
}
HorizontalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$);
HorizontalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::adh', [CategoryAxisBase.$, null], 'YAxis::adi', [NumericYAxis.$, null]]);
return HorizontalAnchoredCategorySeries;
})();