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.ac4 = null;
this.ac0 = null;
this.ac6 = null;
this.ac2 = 0;
}
get ac5() {
if (this.ac4 == null) {
this.ac4 = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.ds.n);
}
return this.ac4;
}
pf() {
super.pf();
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();
}
}
zd() {
return this.ac0;
}
zu() {
return this.ac6;
}
xa(a) {
if (this.zf == null || this.zf.s.count == 0 || !this.hasMarkers || !this.x1()) {
return Rect.empty;
}
return this.ac5.d$d(this, this.zf.s, a, runOn(this, this.adi));
}
adi(a) {
return this.abi.ds(a);
}
ada(a, b, c) {
return this.ac5.d$c(this, this.zu(), a, b, c);
}
aj(a) {
return this.ac5.d$a(this, this.zf.k, this.aag(this.cw), this.aah(this.cw), a);
}
al(a) {
return this.ac5.d$b(this, this.zf.k, this.aag(this.cw), this.aah(this.cw), a);
}
g2(a, b) {
if (this.g1(a, b)) {
return true;
}
if (this.x2(a, b)) {
return true;
}
return false;
}
getOffsetValue() {
return this.zk.r(this.zd(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
}
getCategoryWidth() {
let a = this.getEffectiveViewport1(this.cw);
return this.zd().getCategorySize(this.cw.ca, this.cw.b9, a);
}
jd(a, b, c) {
if (this.dc == null) {
return NaN;
}
let d = this.getEffectiveViewport1(this.cw);
let e = this.zd();
if (e == null) {
return NaN;
}
let f = new ScalerParams(0, this.dc.yr, this.cw.b9, e.dn, d);
let g = this.zk.r(e, this.dc.yr, this.cw.b9, d);
return this.jf(this.valueColumn, a, e, f, g, runOn(this, this.aae), b, c);
}
kj(a, b) {
return this.kk(a, b, this.zd(), runOn(this, this.aae), this.valueColumn);
}
kh(a, b) {
return this.ki(a, b, this.zd(), runOn(this, this.aae), this.valueColumn);
}
iw(a, b, c, d, e) {
if (this.valueColumn == null) {
return Number.POSITIVE_INFINITY;
}
return this.ix(a, b, this.zd(), d, e, this.valueColumn.count, runOn(this, this.aae));
}
ww(a, b, c) {
if (this.zd() == null || this.zu() == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
return this.wy(a, b, c, this.zk.r(this.zd(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.zu(), this.zd(), null, null, null);
}
fetchXAxis() {
return this.ac0;
}
fetchYAxis() {
return this.ac6;
}
ace(a) {
this.xAxis = typeCast(CategoryAxisBase.$, a);
}
acf(a) {
this.yAxis = typeCast(NumericYAxis.$, a);
}
aaa() {
return this.ac6 != null && this.ac6.ed();
}
ade(a) {
this.ac0 = a;
}
adf(a) {
this.ac6 = a;
}
y7(a, b) {
return this.abf(a, b, this.ac0);
}
rq(a, b, c, d) {
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
this.ade(this.xAxis);
if (this.abi.dl) {
this.abi.dk = CategoryTrendLineManagerFactory.a(this.abi.dk, this.ac0, this.td, this, this.ds);
this.abi.dk.g$b = this.trendLineType;
this.abi.dk.g$f = this.trendLinePeriod;
}
break;
case "TrendLineType":
let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
if (e != 0) {
this.abi.dk = CategoryTrendLineManagerFactory.a(this.abi.dk, this.ac0, this.td, this, this.ds);
this.abi.dk.g$b = this.trendLineType;
this.abi.dk.g$f = this.trendLinePeriod;
}
break;
}
super.rq(a, b, c, d);
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
if (c != d) {
this.pp(typeCast(Axis.$, c));
this.ry(typeCast(Axis.$, d));
this.ade(this.xAxis);
this.zo.c9.g(this.ik);
this.r8(false);
this.q0();
}
break;
case HorizontalAnchoredCategorySeries.$$p[1]:
if (c != d) {
this.pp(typeCast(Axis.$, c));
this.ry(typeCast(Axis.$, d));
this.adf(this.yAxis);
if (this.dc != null) {
this.dc.pq();
}
this.zo.c9.g(this.ik);
this.aaa();
this.r8(false);
this.q0();
}
break;
case "CategoryMode":
if (this.xAxis != null) {
this.xAxis.q1(true);
}
break;
}
}
po(a, b, c, d) {
super.po(a, b, c, d);
if (this.ac0 != null && typeCast(ISortingAxis_$type, this.ac0) !== null) {
this.ac0.i$i();
}
switch (a) {
case 4:
if (this.ac0 != null) {
this.ac0.ed();
}
if (this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
break;
case 1:
if (this.ac0 != null) {
this.ac0.ed();
}
if (this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
break;
case 0:
if (this.ac0 != null) {
this.ac0.ed();
}
if (this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
break;
case 2:
if (this.ab0 != null && this.abi.c9.d > 0 && this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
break;
case 3:
if (d == this.ab0) {
if (this.ac0 != null) {
this.ac0.ed();
}
if (this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
}
break;
}
}
ac8(a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.dj) {
return true;
}
return false;
}
ac9(a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
}
get ac3() {
return this.ac2;
}
set ac3(a) {
let b = this.ac3;
if (a != b) {
this.ac2 = a;
this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.ac3));
}
}
get useHighMarkerFidelity() {
return this.aab;
}
}
HorizontalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$);
HorizontalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::adg', [CategoryAxisBase.$, null], 'YAxis::adh', [NumericYAxis.$, null]]);
return HorizontalAnchoredCategorySeries;
})();