igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
220 lines (219 loc) • 7.38 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 { __extends } from "tslib";
import { HorizontalRangeCategorySeries } from "./HorizontalRangeCategorySeries";
import { Array_$type, typeCast, runOn, markType } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Polyline } from "igniteui-react-core";
import { Polygon } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ChartSelection } from "./ChartSelection";
import { isNaN_ } from "igniteui-react-core";
import { RangeCategorySeriesView } from "./RangeCategorySeriesView";
/**
* @hidden
*/
var RangeAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(RangeAreaSeries, _super);
function RangeAreaSeries() {
var _this = _super.call(this) || this;
_this.ab = RangeAreaSeries.$;
return _this;
}
RangeAreaSeries.prototype.bk = function () {
return new RangeAreaSeries();
};
RangeAreaSeries.prototype.ct = function () {
return new RangeAreaSeriesView(this);
};
RangeAreaSeries.prototype.q1 = function (a) {
_super.prototype.q1.call(this, a);
this.ab1 = a;
};
RangeAreaSeries.prototype.get_ew = function () {
return true;
};
RangeAreaSeries.prototype.get_ev = function () {
return true;
};
RangeAreaSeries.prototype.ab2 = function (a, b, c, d) {
if (isNaN_(b.x) || isNaN_(b.y)) {
return false;
}
if (isNaN_(c.x) || isNaN_(c.y)) {
return false;
}
if ((a.y <= b.y && a.y >= c.y)) {
return true;
}
return false;
};
RangeAreaSeries.prototype.gw = function (a, b) {
if (this.gv(a, b)) {
return true;
}
if (this.xj(a, b)) {
return true;
}
return false;
};
RangeAreaSeries.prototype.preferredCategoryMode = function (a) {
return 0;
};
RangeAreaSeries.prototype.o5 = function (a, b) {
_super.prototype.o5.call(this, a, b);
var c = b;
c.dc();
};
RangeAreaSeries.prototype.aam = function (a, b) {
_super.prototype.aam.call(this, a, b);
var c = a.h.count;
var d = new List$1(Array_$type, 2, c);
for (var e = 0; e < c; e++) {
var f = a.h._inner[e];
var g = new Array(4);
g[0] = f[0];
g[1] = f[1];
var h = a.h._inner[a.h.count - 1 - e];
g[2] = h[0];
g[3] = h[2];
d.add(g);
}
var i = typeCast(RangeAreaSeriesView.$, b);
var j = this.getEffectiveViewport1(i);
this.y4.a2(this, this.zo(), runOn(this, this.yo), this.zx(b), this.zy(b));
var k = false;
var l = this.y4.b;
if (l != null) {
k = true;
}
if (k) {
var m = new ScalerParams(0, b.b2, b.b1, this.xAxis.ch, j);
this.aai(d, -1, this.lowColumn.count, this.xAxis, m, b.r, -1);
}
var n = i.dl;
var o = i.dm;
var p = i.dg;
this.y4.ad(n, true, false, true, true);
this.y4.ad(o, true, false, true, true);
this.y4.ad(p, false, true, false, false);
if (b.c4(a)) {
i.dd(a.h.count, d, false);
b.c7(a);
}
i.dg._opacity = this.y4.j * this.h9;
};
RangeAreaSeries.prototype.p4 = function (a, b, c) {
this.aae(a, b, c, this.yv, 1);
};
RangeAreaSeries.prototype.ak = function (a, b) {
var c = new List$1(ChartSelection.$, 0);
this.p4(a, c, b);
return c.toArray();
};
Object.defineProperty(RangeAreaSeries.prototype, "useHighMarkerFidelity", {
get: function () {
return this.zs;
},
enumerable: false,
configurable: true
});
RangeAreaSeries.$t = markType(RangeAreaSeries, 'RangeAreaSeries', HorizontalRangeCategorySeries.$);
return RangeAreaSeries;
}(HorizontalRangeCategorySeries));
export { RangeAreaSeries };
/**
* @hidden
*/
var RangeAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(RangeAreaSeriesView, _super);
function RangeAreaSeriesView(a) {
var _this = _super.call(this, a) || this;
_this.db = null;
_this.dj = new Polyline();
_this.df = new Polygon();
_this.dk = new Polyline();
_this.di = new Polyline();
_this.dh = new Polyline();
_this.de = new Polygon();
_this.db = a;
return _this;
}
RangeAreaSeriesView.prototype.ax = function () {
_super.prototype.ax.call(this);
if (!this.r) {
this.db.xc = 1;
}
};
Object.defineProperty(RangeAreaSeriesView.prototype, "dl", {
get: function () {
return this.dj;
},
enumerable: false,
configurable: true
});
Object.defineProperty(RangeAreaSeriesView.prototype, "dg", {
get: function () {
return this.df;
},
enumerable: false,
configurable: true
});
Object.defineProperty(RangeAreaSeriesView.prototype, "dm", {
get: function () {
return this.dk;
},
enumerable: false,
configurable: true
});
RangeAreaSeriesView.prototype.dc = function () {
this.df.an.clear();
this.dj.an.clear();
this.dk.an.clear();
};
RangeAreaSeriesView.prototype.dd = function (a, b, c) {
this.da(this.dj, this.df, this.dk, a, b, c);
this.av();
};
RangeAreaSeriesView.prototype.bi = function () {
_super.prototype.bi.call(this);
this.dh.an = this.dj.an;
this.di.an = this.dk.an;
this.de.an = this.df.an;
var a = this.bv();
this.dh._stroke = a;
this.dh.ad = this.f.ie + 3;
this.di._stroke = a;
this.di.ad = this.f.ie + 3;
this.de._fill = a;
this.de._opacity = 1;
};
RangeAreaSeriesView.prototype.bc = function (a, b) {
_super.prototype.bc.call(this, a, b);
if (a.d) {
if (b) {
a.u(this.de);
a.v(this.dh);
a.v(this.di);
}
else {
a.u(this.df);
a.v(this.dj);
a.v(this.dk);
}
}
};
RangeAreaSeriesView.prototype.aq = function (a) {
_super.prototype.aq.call(this, a);
this.f.bc.exportPolylineData(a, this.dj, "lowerShape", ["Lower"]);
this.f.bc.exportPolylineData(a, this.dk, "upperShape", ["Upper", "Main"]);
this.f.bc.exportPolygonData(a, this.df, "fillShape", ["Fill"]);
};
RangeAreaSeriesView.$t = markType(RangeAreaSeriesView, 'RangeAreaSeriesView', RangeCategorySeriesView.$);
return RangeAreaSeriesView;
}(RangeCategorySeriesView));
export { RangeAreaSeriesView };