igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
213 lines (212 loc) • 6.86 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 { 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
*/
export let SplineAreaSeries = /*@__PURE__*/ (() => {
class SplineAreaSeries extends SplineSeriesBase {
bk() {
return new SplineAreaSeries();
}
get_ev() {
return true;
}
get_f0() {
return true;
}
ct() {
return new SplineAreaSeriesView(this);
}
y6() {
return 1;
}
q1(a) {
super.q1(a);
this.adi = a;
}
constructor() {
super();
this.adh = null;
this.adh = new CategoryLineRasterizer();
this.ab = SplineAreaSeries.$;
}
preferredCategoryMode(a) {
return 0;
}
cz() {
if (this.c0 == 0) {
return 2;
}
return super.cz();
}
o5(a, b) {
super.o5(a, b);
let c = b;
c.dm();
}
gw(a, b) {
let 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;
}
aam(a, b) {
super.aam(a, b);
let c = this.y5.c0.d;
let d = typeCast(SplineAreaSeriesView.$, b);
let e = a.h;
let f = this.getEffectiveViewport1(b);
this.y4.a2(this, this.zo(), runOn(this, this.yo), this.zx(b), this.zy(b));
let g = false;
let h = this.y4.b;
if (h != null) {
g = true;
}
if (g) {
let 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);
}
let j = d.dy;
let k = d.dz;
let l = d.d0;
let 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, (n, o, p, q, r) => 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);
}
let n = this.fetchYAxis();
}
get useHighMarkerFidelity() {
return this.zs;
}
}
SplineAreaSeries.$t = /*@__PURE__*/ markType(SplineAreaSeries, 'SplineAreaSeries', SplineSeriesBase.$);
return SplineAreaSeries;
})();
/**
* @hidden
*/
export let SplineAreaSeriesView = /*@__PURE__*/ (() => {
class SplineAreaSeriesView extends SplineSeriesBaseView {
constructor(a) {
super(a);
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;
}
ax() {
super.ax();
if (!this.r) {
this.dl.xc = Defaults.e;
}
}
get dy() {
return this.dw;
}
get dz() {
return this.dx;
}
get d0() {
return this.du;
}
get d1() {
return this.dv;
}
dm() {
this.du.an = null;
this.dv.an = null;
this.dw.an = null;
this.dx.an = null;
this.av();
}
dn(a, b, c, d, e, f, g) {
this.dp(a, b, c, d, e, f, g, null);
}
dp(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();
}
bi() {
super.bi();
this.dq.an = this.du.an;
this.ds.an = this.dw.an;
this.dr.an = this.dv.an;
this.dt.an = this.dx.an;
let 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;
}
bc(a, b) {
super.bc(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);
}
}
aq(a) {
super.aq(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"]);
}
ai() {
let 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 = /*@__PURE__*/ markType(SplineAreaSeriesView, 'SplineAreaSeriesView', SplineSeriesBaseView.$);
return SplineAreaSeriesView;
})();