igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
239 lines (238 loc) • 8.05 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 { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries";
import { IUnknownValuePlotting_$type } from "igniteui-react-core";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { typeCast, runOn, enumGetBox, markType, markDep } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ChartSelection } from "./ChartSelection";
import { PropertyMetadata } from "igniteui-react-core";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core";
/**
* @hidden
*/
export let AreaSeries = /*@__PURE__*/ (() => {
class AreaSeries extends HorizontalAnchoredCategorySeries {
bk() {
return new AreaSeries();
}
ct() {
return new AreaSeriesView(this);
}
y6() {
return 1;
}
cz() {
if (this.c0 == 0) {
return 2;
}
return super.cz();
}
q1(a) {
super.q1(a);
this.acx = a;
}
get_ew() {
return true;
}
get_ev() {
return true;
}
constructor() {
super();
this.acy = null;
this.acy = new CategoryLineRasterizer();
this.ab = AreaSeries.$;
this.ach = 0;
}
preferredCategoryMode(a) {
return this.ach;
}
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;
}
o5(a, b) {
super.o5(a, b);
let c = b;
c.dk();
}
aam(a, b) {
super.aam(a, b);
let c = b.c0.d;
let d = typeCast(AreaSeriesView.$, b);
let e = a.h;
let f = this.getEffectiveViewport1(d);
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.dw;
let k = d.dx;
let l = d.dy;
let m = d.dz;
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);
if (b.c4(a)) {
d.dm(e.count, e, true, c, this.id, (n, o, p, q, r) => this.abu(n, a.h.count, b), this.unknownValuePlotting, e.count == 1 ? null : this.aav(e, e.count - 1, b.b1, b.b2, true));
b.c7(a);
}
let n = this.fetchYAxis();
l._opacity = this.y4.j * this.h9;
m._opacity = 0.5 * this.y4.j * this.h9;
}
ra(a, b, c, d) {
super.ra(a, b, c, d);
switch (b) {
case AreaSeries.$$p[0]:
this.y1.m = this.unknownValuePlotting == 0;
this.rs(false);
this.ql();
break;
}
}
ak(a, b) {
let c = new List$1(ChartSelection.$, 0);
this.p4(a, c, b);
return c.toArray();
}
p4(a, b, c) {
this.aae(a, b, c, this.yv, 0);
}
get useHighMarkerFidelity() {
return this.zs;
}
}
AreaSeries.$t = /*@__PURE__*/ markType(AreaSeries, 'AreaSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
AreaSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, AreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting::ac0', [UnknownValuePlotting_$type, /*@__PURE__*/ enumGetBox(UnknownValuePlotting_$type, 1)]]);
return AreaSeries;
})();
/**
* @hidden
*/
export let AreaSeriesView = /*@__PURE__*/ (() => {
class AreaSeriesView extends AnchoredCategorySeriesView {
constructor(a) {
super(a);
this.dj = null;
this.ds = new Path();
this.du = new Path();
this.dt = new Path();
this.dv = new Path();
this.dn = new Path();
this.dq = new Path();
this.dp = new Path();
this.dr = new Path();
this.dj = a;
}
ax() {
super.ax();
if (!this.r) {
this.dj.xc = Defaults.e;
}
}
get dw() {
return this.du;
}
get dx() {
return this.dv;
}
get dy() {
return this.ds;
}
get dz() {
return this.dt;
}
dk() {
this.ds.an = null;
this.dt.an = null;
this.du.an = null;
this.dv.an = null;
this.av();
}
dl(a, b, c, d, e, f, g) {
this.dm(a, b, c, d, e, f, g, null);
}
dm(a, b, c, d, e, f, g, h) {
this.dj.acy.a = typeCast(ISortingAxis_$type, this.c2.fetchXAxis()) !== null ? true : false;
this.dj.acy.j(this.ds, this.du, this.dt, this.dv, a, b, c, d, e, f, g, h);
this.av();
}
bi() {
super.bi();
this.dn.an = this.ds.an;
this.dq.an = this.du.an;
this.dp.an = this.dt.an;
this.dr.an = this.dv.an;
let a = this.bv();
this.dn._fill = a;
this.dn._opacity = 1;
this.dp._fill = a;
this.dp._opacity = 1;
this.dq._stroke = a;
this.dq.ad = this.f.ie + 3;
this.dr._stroke = a;
this.dr.ad = this.f.ie + 3;
}
bc(a, b) {
super.bc(a, b);
if (b) {
a.t(this.dn);
a.t(this.dp);
a.t(this.dq);
a.t(this.dr);
}
else {
a.t(this.ds);
a.t(this.dt);
a.t(this.du);
a.t(this.dv);
}
}
aq(a) {
super.aq(a);
this.f.bc.exportPathData(a, this.du, "lowerShape", ["Lower"]);
this.f.bc.exportPathData(a, this.dv, "upperShape", ["Upper", "Main"]);
this.f.bc.exportPathData(a, this.dt, "translucentShape", ["Translucent"]);
this.f.bc.exportPathData(a, this.ds, "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;
}
}
AreaSeriesView.$t = /*@__PURE__*/ markType(AreaSeriesView, 'AreaSeriesView', AnchoredCategorySeriesView.$);
return AreaSeriesView;
})();