igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
223 lines (222 loc) • 9.61 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 { RangeCategorySeries } from "./RangeCategorySeries";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { DependencyProperty } from "igniteui-react-core";
import { NumericYAxis } from "./NumericYAxis";
import { Axis } from "./Axis";
import { Point_$type, runOn, typeCast, markType, markDep } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { RangeValueList } from "./RangeValueList";
import { ScalerParams } from "./ScalerParams";
import { CategoryXAxis } from "./CategoryXAxis";
import { DataLegendSeriesValueInfo } from "igniteui-react-core";
import { DataLegendSeriesContext } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
/**
* @hidden
*/
export let HorizontalRangeCategorySeries = /*@__PURE__*/ (() => {
class HorizontalRangeCategorySeries extends RangeCategorySeries {
fetchXAxis() {
return this.xAxis;
}
fetchYAxis() {
return this.yAxis;
}
o8() {
super.o8();
this.xAxis = null;
this.yAxis = null;
}
aj(a) {
let b = this.an(this.y3(), this.y5.h, this.z6(this.cw), this.z7(this.cw), this.ws(a), true);
if (b == null) {
return null;
}
let c = b[0];
let d = b[1];
let e = new Array(1);
let f = new Array(2);
f[0] = { $type: Point_$type, x: c[0], y: c[2] };
f[1] = { $type: Point_$type, x: d[0], y: d[2] };
e[0] = f;
return e;
}
al(a) {
let b = this.an(this.y3(), this.y5.h, this.z6(this.cw), this.z7(this.cw), this.ws(a), true);
if (b == null) {
return null;
}
let c = b[0];
let d = b[1];
let e = new Array(1);
let f = new Array(2);
f[0] = { $type: Point_$type, x: c[0], y: c[1] };
f[1] = { $type: Point_$type, x: d[0], y: d[1] };
e[0] = f;
return e;
}
get_fv() {
return true;
}
b3() {
if (this.b4 == 0) {
return 1;
}
else {
return super.b3();
}
}
getOffsetValue() {
return this.RangeFramePreparer.r(this.xAxis, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
}
getCategoryWidth() {
return this.xAxis.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
}
kc(a, b) {
return this.kd(a, b, this.xAxis, runOn(this, this.z4), new RangeValueList(this.highColumn, this.lowColumn));
}
ke(a, b) {
return this.kf(a, b, this.xAxis, runOn(this, this.z4), new RangeValueList(this.highColumn, this.lowColumn));
}
ir(a, b, c, d, e) {
if (c == null) {
return Number.POSITIVE_INFINITY;
}
let f = this.xAxis.o5;
return this.is(a, b, this.xAxis, d, e, f, runOn(this, this.z4));
}
i8(a, b, c) {
if (this.dc == null) {
return NaN;
}
let d = this.getEffectiveViewport1(this.cw);
let e = new ScalerParams(0, this.dc.xn, this.cw.b9, this.xAxis.df, d);
let f = this.RangeFramePreparer.r(this.xAxis, this.dc.xn, this.cw.b9, d);
return this.ja(new RangeValueList(this.highColumn, this.lowColumn), a, this.xAxis, e, f, runOn(this, this.z4), b, c);
}
i6(a, b, c) {
if (this.dc == null) {
return NaN;
}
let d = this.getEffectiveViewport1(this.cw);
let e = new ScalerParams(0, this.dc.xn, this.cw.b9, this.xAxis.df, d);
let f = this.RangeFramePreparer.r(this.xAxis, this.dc.xn, this.cw.b9, d);
return this.ja(this.lowColumn, a, this.xAxis, e, f, runOn(this, this.z4), b, c);
}
i4(a, b, c) {
if (this.dc == null) {
return NaN;
}
let d = this.getEffectiveViewport1(this.cw);
let e = new ScalerParams(0, this.dc.xn, this.cw.b9, this.xAxis.df, d);
let f = this.RangeFramePreparer.r(this.xAxis, this.dc.xn, this.cw.b9, d);
return this.ja(this.highColumn, a, this.xAxis, e, f, runOn(this, this.z4), b, c);
}
wj(a, b, c) {
return this.wp(a, b, c, this.RangeFramePreparer.r(this.xAxis, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yAxis, this.xAxis, runOn(this, this.i4), (d, e) => this.kf(d, e, this.xAxis, runOn(this, this.z4), this.highColumn), (d, e) => this.kd(d, e, this.xAxis, runOn(this, this.z4), this.highColumn));
}
wl(a, b, c) {
return this.wp(a, b, c, this.RangeFramePreparer.r(this.xAxis, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yAxis, this.xAxis, runOn(this, this.i6), (d, e) => this.kf(d, e, this.xAxis, runOn(this, this.z4), this.lowColumn), (d, e) => this.kd(d, e, this.xAxis, runOn(this, this.z4), this.lowColumn));
}
wn(a, b, c) {
return this.wp(a, b, c, this.RangeFramePreparer.r(this.xAxis, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yAxis, this.xAxis, null, null, null);
}
z0() {
return this.yAxis != null && this.yAxis.d2();
}
rh(a, b, c, d) {
super.rh(a, b, c, d);
switch (b) {
case HorizontalRangeCategorySeries.$$p[0]:
case HorizontalRangeCategorySeries.$$p[1]:
case HorizontalRangeCategorySeries.$$p[2]:
case HorizontalRangeCategorySeries.$$p[3]:
this.qm();
break;
case HorizontalRangeCategorySeries.$$p[4]:
this.pi(typeCast(Axis.$, c));
this.rp(typeCast(Axis.$, d));
this.ze.c9.g(this.ie);
this.rz(false);
this.qs();
break;
case HorizontalRangeCategorySeries.$$p[5]:
this.pi(typeCast(Axis.$, c));
this.rp(typeCast(Axis.$, d));
this.ze.c9.g(this.ie);
this.z0();
this.rz(false);
this.qs();
break;
}
}
abw(a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
}
abv(a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.dc) {
return true;
}
return false;
}
getDataLegendSeriesContextAt(a, b) {
let c = { $type: Point_$type, x: a, y: b };
let d = this.i6(c, false, false);
let e = this.i4(c, false, false);
let f = new DataLegendSeriesValueInfo();
f.a = 1;
f.l = e > d ? d : e;
f.q = "Low";
f.r = this.abk != null ? this.abk : "Low";
f.s = this.ab1 != null ? this.ab1 : "L:";
f.t = this.ab3 != null ? this.ab3 : "";
let g = new DataLegendSeriesValueInfo();
g.a = 2;
g.l = e > d ? e : d;
g.q = "High";
g.r = this.abh != null ? this.abh : "High";
g.s = this.abx != null ? this.abx : "H:";
g.t = this.abz != null ? this.abz : "";
let h = new DataLegendSeriesValueInfo();
h.a = 7;
h.l = Math.abs(g.l - f.l);
h.q = "Range";
h.r = "Range";
h.s = "R:";
h.k = true;
let i = new DataLegendSeriesValueInfo();
i.a = 6;
i.l = f.l + (h.l / 2);
i.q = "Average";
i.r = "Average";
i.s = "A:";
i.k = true;
let j = new DataLegendSeriesContext();
j.e = ((() => {
let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
$ret.add(g);
$ret.add(f);
$ret.add(h);
$ret.add(i);
return $ret;
})());
j.h = this.mh();
return j;
}
get useHighMarkerFidelity() {
return this.z1;
}
}
HorizontalRangeCategorySeries.$t = /*@__PURE__*/ markType(HorizontalRangeCategorySeries, 'HorizontalRangeCategorySeries', RangeCategorySeries.$);
HorizontalRangeCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalRangeCategorySeries, 'raisePropertyChanged', ['HighMemberAsLegendLabel:abx:ab7', [2, null], 'HighMemberAsLegendUnit:abz:ab8', [2, null], 'LowMemberAsLegendLabel:ab1:ab9', [2, null], 'LowMemberAsLegendUnit:ab3:aca', [2, null], 'XAxis::acb', [CategoryAxisBase.$, null], 'YAxis::acc', [NumericYAxis.$, null]]);
return HorizontalRangeCategorySeries;
})();