igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
209 lines (208 loc) • 7.79 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 { AnchoredRadialSeries } from "./AnchoredRadialSeries";
import { UnknownValuePlotting_$type } from "igniteui-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { Array_$type, Point_$type, runOn, enumGetBox, markType, markDep } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { ViewportUtils } from "./ViewportUtils";
import { ChartSelection } from "./ChartSelection";
import { PropertyMetadata } from "igniteui-angular-core";
import { AnchoredRadialSeriesView } from "./AnchoredRadialSeriesView";
import { Defaults } from "./Defaults";
/**
* @hidden
*/
export let RadialAreaSeries = /*@__PURE__*/ (() => {
class RadialAreaSeries extends AnchoredRadialSeries {
constructor() {
super();
this.ab = RadialAreaSeries.$;
}
bj() {
return new RadialAreaSeries();
}
get_eu() {
return true;
}
cs() {
return new RadialAreaSeriesView(this);
}
q0(a) {
super.q0(a);
this.ado = a;
}
preferredCategoryMode(a) {
return 0;
}
o4(a, b) {
super.o4(a, b);
this.ado.c6();
}
abb(a, b) {
super.abb(a, b);
let c = b.by;
let d = b.bx;
let e = b.getEffectiveViewport();
let f = b;
if (b.o() && !c.isEmpty && !d.isEmpty && this.yy != null && this.y4 != null) {
let g = a.f;
let h = g.count;
let i = new List$1(Array_$type, 2, h);
let j = 0;
for (let k = 0; k < h; k++) {
let l = new Array(4);
i.add(l);
l[0] = this.y7.d(a.f._inner[k][0], a.f._inner[k][1], c, d, e);
l[1] = this.y7.e(a.f._inner[k][0], a.f._inner[k][1], c, d, e);
l[2] = this.y7.d(a.f._inner[k][0], a.f._inner[k][2], c, d, e);
let m = a.f._inner[k][2];
l[3] = this.y7.e(a.f._inner[k][0], m, c, d, e);
if (m > j) {
j = m;
}
}
let n = ViewportUtils.e(0.5, c, d, e);
let o = ViewportUtils.i(0.5, c, d, e);
this.adn = { $type: Point_$type, x: n, y: o };
let p = this.getEffectiveViewport1(f);
this.zf.a2(this, this.zw(), runOn(this, this.ym), this.z5(b), this.z6(b));
let q = false;
let r = this.zf.b;
if (r != null) {
q = true;
}
if (q) {
let s = new ScalerParams(0, b.by, b.bx, this.yy.ch, p);
this.ac4(g, -1, this.ab7.count, this.yy, s, b.q);
}
let t = f.de;
let u = f.df;
let v = f.dc;
let w = f.dd;
this.zf.ad(t, true, false, true, true);
this.zf.ad(u, true, false, true, true);
this.zf.ad(v, false, true, false, false);
this.zf.ad(w, false, true, false, false);
f.c7(a.f.count, i, false, this.ado.cx.b, this.ic, runOn(this, this.ac5), this.adp);
v._opacity = this.zf.j * this.h8;
w._opacity = 0.5 * this.zf.j * this.h8;
}
}
ak(a, b) {
let c = new List$1(ChartSelection.$, 0);
this.p3(a, c, b);
return c.toArray();
}
p3(a, b, c) {
this.ac1(a, b, c, this.yz);
}
q8(a, b, c, d) {
super.q8(a, b, c, d);
switch (b) {
case RadialAreaSeries.$$p[0]:
this.rq(false);
this.qk();
break;
}
}
get_acd() {
return true;
}
}
RadialAreaSeries.$t = markType(RadialAreaSeries, 'RadialAreaSeries', AnchoredRadialSeries.$);
RadialAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, RadialAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:adp:adr', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
return RadialAreaSeries;
})();
/**
* @hidden
*/
export let RadialAreaSeriesView = /*@__PURE__*/ (() => {
class RadialAreaSeriesView extends AnchoredRadialSeriesView {
constructor(a) {
super(a);
this.c5 = null;
this.dc = new Path();
this.de = new Path();
this.dd = new Path();
this.df = new Path();
this.c8 = new Path();
this.da = new Path();
this.c9 = new Path();
this.db = new Path();
this.c5 = a;
}
au() {
super.au();
if (!this.q) {
this.c5.w9 = Defaults.e;
}
}
c6() {
this.dc.an = null;
this.de.an = null;
this.dd.an = null;
this.df.an = null;
this.c8.an = null;
this.da.an = null;
this.c9.an = null;
this.db.an = null;
this.as();
}
c7(a, b, c, d, e, f, g) {
this.c1.ab2.i(this.dc, this.de, this.dd, this.df, a, b, c, d, e, f, g);
this.as();
}
bd() {
super.bd();
}
be() {
super.be();
let a = this.br();
this.da.an = this.de.an;
this.db.an = this.df.an;
this.c8.an = this.dc.an;
this.c9.an = this.dd.an;
this.da._stroke = a;
this.da.ad = this.e.id + 3;
this.db._stroke = a;
this.db.ad = this.e.id + 3;
this.c8._fill = a;
this.c8._opacity = 1;
this.c9._fill = a;
this.c9._opacity = 1;
}
a8(a, b) {
super.a8(a, b);
if (a.d) {
if (b) {
a.t(this.c8);
a.t(this.c9);
a.t(this.da);
a.t(this.db);
}
else {
a.t(this.dc);
a.t(this.dd);
a.t(this.de);
a.t(this.df);
}
}
}
an(a) {
super.an(a);
this.e.bc.exportPathData(a, this.de, "lowerShape", ["Lower"]);
this.e.bc.exportPathData(a, this.df, "upperShape", ["Upper", "Main"]);
this.e.bc.exportPathData(a, this.dd, "translucentShape", ["Translucent"]);
this.e.bc.exportPathData(a, this.dc, "fillShape", ["Fill"]);
}
}
RadialAreaSeriesView.$t = markType(RadialAreaSeriesView, 'RadialAreaSeriesView', AnchoredRadialSeriesView.$);
return RadialAreaSeriesView;
})();