igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
237 lines (236 loc) • 8.14 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 { SplineSeriesBase } from "./SplineSeriesBase";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { typeCast, runOn, markType } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { SplineSeriesBaseView } from "./SplineSeriesBaseView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core";
/**
* @hidden
*/
var SplineAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(SplineAreaSeries, _super);
function SplineAreaSeries() {
var _this = _super.call(this) || this;
_this.adh = null;
_this.adh = new CategoryLineRasterizer();
_this.ab = SplineAreaSeries.$;
return _this;
}
SplineAreaSeries.prototype.bk = function () {
return new SplineAreaSeries();
};
SplineAreaSeries.prototype.get_ev = function () {
return true;
};
SplineAreaSeries.prototype.get_f0 = function () {
return true;
};
SplineAreaSeries.prototype.ct = function () {
return new SplineAreaSeriesView(this);
};
SplineAreaSeries.prototype.y6 = function () {
return 1;
};
SplineAreaSeries.prototype.q1 = function (a) {
_super.prototype.q1.call(this, a);
this.adi = a;
};
SplineAreaSeries.prototype.preferredCategoryMode = function (a) {
return 0;
};
SplineAreaSeries.prototype.cz = function () {
if (this.c0 == 0) {
return 2;
}
return _super.prototype.cz.call(this);
};
SplineAreaSeries.prototype.o5 = function (a, b) {
_super.prototype.o5.call(this, a, b);
var c = b;
c.dm();
};
SplineAreaSeries.prototype.gw = function (a, b) {
var c = this.we(this.wj(a), true, false);
if (this.aco(a, c, b)) {
return true;
}
if (this.gv(a, b)) {
return true;
}
if (this.xj(a, b)) {
return true;
}
return false;
};
SplineAreaSeries.prototype.aam = function (a, b) {
var _this = this;
_super.prototype.aam.call(this, a, b);
var c = this.y5.c0.d;
var d = typeCast(SplineAreaSeriesView.$, b);
var e = a.h;
var f = this.getEffectiveViewport1(b);
this.y4.a2(this, this.zo(), runOn(this, this.yo), this.zx(b), this.zy(b));
var g = false;
var h = this.y4.b;
if (h != null) {
g = true;
}
if (g) {
var i = new ScalerParams(0, b.b2, b.b1, this.ace.ch, f);
this.aai(e, -1, this.valueColumn.count, this.ace, i, b.r, -1);
}
var j = d.dy;
var k = d.dz;
var l = d.d0;
var m = d.d1;
this.y4.ad(j, true, false, true, true);
this.y4.ad(k, true, false, true, true);
this.y4.ad(l, false, true, false, false);
this.y4.ad(m, false, true, false, false);
l._opacity = this.y4.j * this.h9;
m._opacity = 0.5 * this.y4.j * this.h9;
if (b.c4(a)) {
d.dp(a.h.count, e, true, c, this.id, function (n, o, p, q, r) { return _this.abu(n, a.h.count, b); }, 1, a.h.count == 1 ? null : this.aav(e, e.count - 1, b.b1, b.b2, true));
b.c7(a);
}
var n = this.fetchYAxis();
};
Object.defineProperty(SplineAreaSeries.prototype, "useHighMarkerFidelity", {
get: function () {
return this.zs;
},
enumerable: false,
configurable: true
});
SplineAreaSeries.$t = markType(SplineAreaSeries, 'SplineAreaSeries', SplineSeriesBase.$);
return SplineAreaSeries;
}(SplineSeriesBase));
export { SplineAreaSeries };
/**
* @hidden
*/
var SplineAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(SplineAreaSeriesView, _super);
function SplineAreaSeriesView(a) {
var _this = _super.call(this, a) || this;
_this.dl = null;
_this.du = new Path();
_this.dw = new Path();
_this.dv = new Path();
_this.dx = new Path();
_this.dq = new Path();
_this.ds = new Path();
_this.dr = new Path();
_this.dt = new Path();
_this.dl = a;
return _this;
}
SplineAreaSeriesView.prototype.ax = function () {
_super.prototype.ax.call(this);
if (!this.r) {
this.dl.xc = Defaults.e;
}
};
Object.defineProperty(SplineAreaSeriesView.prototype, "dy", {
get: function () {
return this.dw;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SplineAreaSeriesView.prototype, "dz", {
get: function () {
return this.dx;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SplineAreaSeriesView.prototype, "d0", {
get: function () {
return this.du;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SplineAreaSeriesView.prototype, "d1", {
get: function () {
return this.dv;
},
enumerable: false,
configurable: true
});
SplineAreaSeriesView.prototype.dm = function () {
this.du.an = null;
this.dv.an = null;
this.dw.an = null;
this.dx.an = null;
this.av();
};
SplineAreaSeriesView.prototype.dn = function (a, b, c, d, e, f, g) {
this.dp(a, b, c, d, e, f, g, null);
};
SplineAreaSeriesView.prototype.dp = function (a, b, c, d, e, f, g, h) {
this.dl.adh.a = typeCast(ISortingAxis_$type, this.c2.fetchXAxis()) !== null ? true : false;
this.dl.adh.j(this.du, this.dw, this.dv, this.dx, a, b, c, d, e, f, g, h);
this.av();
};
SplineAreaSeriesView.prototype.bi = function () {
_super.prototype.bi.call(this);
this.dq.an = this.du.an;
this.ds.an = this.dw.an;
this.dr.an = this.dv.an;
this.dt.an = this.dx.an;
var a = this.bv();
this.dq._fill = a;
this.dq._opacity = 1;
this.dr._fill = a;
this.dr._opacity = 1;
this.ds._stroke = a;
this.ds.ad = this.f.ie + 3;
this.dt._stroke = a;
this.dt.ad = this.f.ie + 3;
};
SplineAreaSeriesView.prototype.bc = function (a, b) {
_super.prototype.bc.call(this, a, b);
if (b) {
a.t(this.dq);
a.t(this.dr);
a.t(this.ds);
a.t(this.dt);
}
else {
a.t(this.du);
a.t(this.dv);
a.t(this.dw);
a.t(this.dx);
}
};
SplineAreaSeriesView.prototype.aq = function (a) {
_super.prototype.aq.call(this, a);
this.f.bc.exportPathData(a, this.dw, "lowerShape", ["Lower"]);
this.f.bc.exportPathData(a, this.dx, "upperShape", ["Upper", "Main"]);
this.f.bc.exportPathData(a, this.dv, "translucentShape", ["Translucent"]);
this.f.bc.exportPathData(a, this.du, "fillShape", ["Fill"]);
};
SplineAreaSeriesView.prototype.ai = function () {
var a = new Color();
a.colorString = "rgba(95,95,95,0.5)";
this.f.v3 = a;
this.f.jm = 5;
this.f.jn = 1;
this.f.jo = -3;
};
SplineAreaSeriesView.$t = markType(SplineAreaSeriesView, 'SplineAreaSeriesView', SplineSeriesBaseView.$);
return SplineAreaSeriesView;
}(SplineSeriesBaseView));
export { SplineAreaSeriesView };