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);
}
zp() {
return 1;
}
cz() {
if (this.c0 == 0) {
return 2;
}
return super.cz();
}
rh(a) {
super.rh(a);
this.adj = a;
}
get_ey() {
return true;
}
get_ex() {
return true;
}
constructor() {
super();
this.adk = null;
this.adk = new CategoryLineRasterizer();
this.ab = AreaSeries.$;
this.ac3 = 0;
}
preferredCategoryMode(a) {
return this.ac3;
}
g2(a, b) {
let c = this.ww(this.w2(a), true, false);
if (this.ada(a, c, b)) {
return true;
}
if (this.g1(a, b)) {
return true;
}
if (this.x2(a, b)) {
return true;
}
return false;
}
pi(a, b) {
super.pi(a, b);
let c = b;
c.du();
}
aa8(a, b) {
super.aa8(a, b);
let c = b.c9.d;
let d = typeCast(AreaSeriesView.$, b);
let e = a.k;
let f = this.getEffectiveViewport1(d);
this.zn.a2(this, this.z7(), runOn(this, this.y7), this.aag(b), this.aah(b));
let g = false;
let h = this.zn.b;
if (h != null) {
g = true;
}
if (g) {
let i = new ScalerParams(0, b.ca, b.b9, this.ac0.dn, f);
this.aa4(e, -1, this.valueColumn.count, this.ac0, i, b.t, -1);
}
let j = d.d5;
let k = d.d6;
let l = d.d7;
let m = d.d8;
this.zn.ad(j, true, false, true, true);
this.zn.ad(k, true, false, true, true);
this.zn.ad(l, false, true, false, false);
this.zn.ad(m, false, true, false, false);
if (b.dd(a)) {
d.dw(e.count, e, true, c, this.ik, (n, o, p, q, r) => this.acg(n, a.k.count, b), this.unknownValuePlotting, e.count == 1 ? null : this.abh(e, e.count - 1, b.b9, b.ca, true));
b.dg(a);
}
let n = this.fetchYAxis();
l._opacity = this.zn.j * this.ig;
m._opacity = 0.5 * this.zn.j * this.ig;
}
rq(a, b, c, d) {
super.rq(a, b, c, d);
switch (b) {
case AreaSeries.$$p[0]:
this.zk.m = this.unknownValuePlotting == 0;
this.r8(false);
this.q0();
break;
}
}
ak(a, b) {
let c = new List$1(ChartSelection.$, 0);
this.qi(a, c, b);
return c.toArray();
}
qi(a, b, c) {
this.aa0(a, b, c, this.ze, 0);
}
get useHighMarkerFidelity() {
return this.aab;
}
}
AreaSeries.$t = /*@__PURE__*/ markType(AreaSeries, 'AreaSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
AreaSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, AreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting::adm', [UnknownValuePlotting_$type, /*@__PURE__*/ enumGetBox(UnknownValuePlotting_$type, 1)]]);
return AreaSeries;
})();
/**
* @hidden
*/
export let AreaSeriesView = /*@__PURE__*/ (() => {
class AreaSeriesView extends AnchoredCategorySeriesView {
constructor(a) {
super(a);
this.dt = null;
this.d1 = new Path();
this.d3 = new Path();
this.d2 = new Path();
this.d4 = new Path();
this.dx = new Path();
this.dz = new Path();
this.dy = new Path();
this.d0 = new Path();
this.dt = a;
}
a4() {
super.a4();
if (!this.t) {
this.dt.xv = Defaults.e;
}
}
get d5() {
return this.d3;
}
get d6() {
return this.d4;
}
get d7() {
return this.d1;
}
get d8() {
return this.d2;
}
du() {
this.d1.an = null;
this.d2.an = null;
this.d3.an = null;
this.d4.an = null;
this.a2();
}
dv(a, b, c, d, e, f, g) {
this.dw(a, b, c, d, e, f, g, null);
}
dw(a, b, c, d, e, f, g, h) {
this.dt.adk.a = typeCast(ISortingAxis_$type, this.db.fetchXAxis()) !== null ? true : false;
this.dt.adk.j(this.d1, this.d3, this.d2, this.d4, a, b, c, d, e, f, g, h);
this.a2();
}
bq() {
super.bq();
this.dx.an = this.d1.an;
this.dz.an = this.d3.an;
this.dy.an = this.d2.an;
this.d0.an = this.d4.an;
let a = this.b3();
this.dx._fill = a;
this.dx._opacity = 1;
this.dy._fill = a;
this.dy._opacity = 1;
this.dz._stroke = a;
this.dz.ad = this.f.il + 3;
this.d0._stroke = a;
this.d0.ad = this.f.il + 3;
}
bj(a, b) {
super.bj(a, b);
if (b) {
a.t(this.dx);
a.t(this.dy);
a.t(this.dz);
a.t(this.d0);
}
else {
a.t(this.d1);
a.t(this.d2);
a.t(this.d3);
a.t(this.d4);
}
}
ax(a) {
super.ax(a);
this.f.bc.exportPathData(a, this.d3, "lowerShape", ["Lower"]);
this.f.bc.exportPathData(a, this.d4, "upperShape", ["Upper", "Main"]);
this.f.bc.exportPathData(a, this.d2, "translucentShape", ["Translucent"]);
this.f.bc.exportPathData(a, this.d1, "fillShape", ["Fill"]);
}
an() {
let a = new Color();
a.colorString = "rgba(95,95,95,0.5)";
this.f.wl = a;
this.f.jv = 5;
this.f.jw = 1;
this.f.jx = -3;
}
}
AreaSeriesView.$t = /*@__PURE__*/ markType(AreaSeriesView, 'AreaSeriesView', AnchoredCategorySeriesView.$);
return AreaSeriesView;
})();