igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
909 lines (908 loc) • 29.4 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 { RadialBaseChart } from "./RadialBaseChart";
import { ProportionalCategoryAngleAxis } from "./ProportionalCategoryAngleAxis";
import { NumericRadiusAxis } from "./NumericRadiusAxis";
import { Base, typeCast, runOn, delegateCombine, enumGetBox, markType } from "igniteui-angular-core";
import { PieChartSweepDirection_$type } from "./PieChartSweepDirection";
import { CalloutCollisionMode_$type } from "igniteui-angular-core";
import { LegendEmptyValuesMode_$type } from "igniteui-angular-core";
import { OthersCategoryType_$type } from "igniteui-angular-core";
import { AxisRangeBufferMode_$type } from "./AxisRangeBufferMode";
import { RadialLabelMode_$type } from "igniteui-angular-core";
import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { RadialBase } from "./RadialBase";
import { List$1 } from "igniteui-angular-core";
import { RadialPieSeries } from "./RadialPieSeries";
import { AnchoredRadialSeries } from "./AnchoredRadialSeries";
import { AxisLabelSettings } from "./AxisLabelSettings";
import { OthersCategoryContext } from "./OthersCategoryContext";
import { isNaN_ } from "igniteui-angular-core";
/**
* @hidden
*/
export let DataPieBaseChart = /*@__PURE__*/ (() => {
class DataPieBaseChart extends RadialBaseChart {
constructor() {
super();
this.ajx = null;
this.ah0 = null;
this.ajt = null;
this.ahy = null;
this.ajv = null;
this.ahz = null;
this.ajs = null;
this.ahx = null;
this.ai4 = 0;
this.aii = 0;
this.ah7 = 6;
this.alk = null;
this.alj = null;
this.ajy = null;
this.ajr = null;
this.aib = 0;
this.aig = 1;
this.ai5 = 3;
this.aju = null;
this.ajq = null;
this.aiu = true;
this.ah5 = 0;
this.ai2 = 0;
this.ai3 = 0;
this.ai8 = 0;
this.aiv = false;
this.ajo = 10;
this.aja = NaN;
this.ai9 = NaN;
this.ajb = 0;
this.ai6 = NaN;
this.ai7 = NaN;
this.ajw = " - ";
this.ain = 0;
this.aim = 0;
this.air = true;
this.ait = true;
this.ah9 = 0;
this.ais = false;
}
hg() {
return true;
}
alf(a) {
this.alg((b, c) => a(b));
}
alg(a) {
if (this.dataChart == null) {
return;
}
for (let b = 0; b < this.dataChart.series.count; b++) {
let c = this.dataChart.series._inner[b];
if (c.fu) {
a(c, b);
}
}
}
ald(a) {
this.ale((b, c) => a(b));
}
ale(a) {
if (this.dataChart == null) {
return;
}
for (let b = 0; b < this.dataChart.series.count; b++) {
let c = this.dataChart.series._inner[b];
if (c.fu) {
a(c, b);
}
}
}
xa() {
let a = this.bf.dataSeries != null ? this.bf.dataSeries.count : 0;
super.xa();
if (this.aj5 != null) {
let b = this.aj5;
this.angleAxis.f2 = b;
}
else {
this.angleAxis.f2 = this.ade == null ? RadialBaseChart.aex(this.angleAxis, this.bf.dataSeries) : this.ade;
}
this.angleAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
if (this.ala != null) {
this.angleAxis.or = this.ala;
}
else {
this.angleAxis.or = (this.dataChart != null && this.dataChart.series.count > 0 && typeCast(RadialPieSeries.$, this.dataChart.series._inner[0]) !== null) ? this.dataChart.series._inner[0].ac0 : null;
}
}
c2(a, b) {
if (this.c5 == null || this.c5.count == 0) {
return 13;
}
let c = super.c2(a, b);
if (c == 1) {
return 13;
}
return c;
}
w8(a) {
}
hc(a) {
if (!super.hc(a)) {
return false;
}
return true;
}
xb() {
this.valueAxis.lo = this.ai1;
this.valueAxis.mm = this.ajp;
}
get angleAxis() {
return this.aik;
}
set angleAxis(a) {
let b = this.angleAxis;
if (a != b) {
this.aik = a;
this.wd("AngleAxis", b, this.angleAxis);
}
}
get valueAxis() {
return this.aid;
}
set valueAxis(a) {
let b = this.valueAxis;
if (a != b) {
this.aid = a;
this.wd("ValueAxis", b, this.valueAxis);
}
}
get_aiy() {
return false;
}
get aiy() {
return this.get_aiy();
}
dc(a, b) {
let c = null;
if (b == 35) {
c = this.aiq(a, b);
}
if (a.index > 0) {
if (!this.aiy) {
if (c != null) {
c.o4();
}
return null;
}
}
return c;
}
vn(a, b) {
super.vn(a, b);
if (this.g0(a) && this.ce.isCalloutLayer(a)) {
if (this.alm != null) {
this.ce.setCalloutLightColor(a, this.alm);
}
if (this.all != null) {
this.ce.setCalloutDarkColor(a, this.all);
}
let c = this.ah;
if (this.ah8 != 0) {
c = this.ah8;
}
this.ce.setCollisionMode(a, c);
}
}
aiq(a, b) {
let c = null;
if (b == 35) {
c = this.df(35);
}
else {
c = this.df(35);
}
if (this.ala != null) {
c.ac0 = this.ala;
}
else {
c.ac0 = a.getMemberPathFor(0);
}
if (this.aj8 != null) {
c.ad3 = this.aj8;
}
c.adt = this.aic;
c.y4 = this.angleAxis;
c.za = this.valueAxis;
c.ha = true;
c.ack = true;
c.aa5 = this.aku;
c.yw = this.ah4;
c.aa2 = this.akn;
c.yv = this.ah3;
c.aav = this.ake;
c.yt = this.ah2;
c.aaz = this.aka;
c.yu = this.ah1;
c.zh = this.aip;
c.zi = this.aio;
c.aag = this.aks;
return c;
}
aaq() {
return this.angleAxis;
}
aar() {
return this.valueAxis;
}
ux() {
this.angleAxis = new ProportionalCategoryAngleAxis();
this.angleAxis.name = "angleAxis";
let a = this.angleAxis;
a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.alh));
this.angleAxis.k5 = 0;
this.valueAxis = new NumericRadiusAxis();
this.valueAxis.name = "valueAxis";
let b = this.valueAxis;
b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.ali));
if (this.angleAxis.az == null) {
this.angleAxis.az = new AxisLabelSettings();
}
if (this.valueAxis.az == null) {
this.valueAxis.az = new AxisLabelSettings();
}
}
alh(a, b) {
switch (b.propertyName) {
case "ActualMinimumValue":
this.wv("AngleAxisActualMinimum");
break;
case "ActualMaximumValue":
this.wv("AngleAxisActualMaximum");
break;
}
}
ali(a, b) {
switch (b.propertyName) {
case "ActualMinimumValue":
this.wv("ValueAxisActualMinimum");
break;
case "ActualMaximumValue":
this.wv("ValueAxisActualMaximum");
break;
}
}
ur(a, b) {
let c = typeCast(RadialBase.$, a);
if (c != null) {
c.xf = this.c2(a, b);
}
}
af9(a) {
super.af9(a);
a.lf = this.aiz;
a.lj = this.ai0;
a.og = this.aje;
if (!isNaN_(this.ajg)) {
a.oh = this.ajg;
}
else {
a.oh = 0.65;
}
}
af7(a) {
super.af7(a);
a.ol = this.akj;
a.n0 = this.aih;
a.oe = this.ajf;
if (!isNaN_(this.ajh)) {
a.ne = this.ajh;
}
if (this.aij != 0) {
if (this.aij == 1) {
a.ch = false;
}
else {
a.ch = true;
}
}
}
vi(a) {
super.vi(a);
a.ev = this.aix;
}
wd(a, b, c) {
super.wd(a, b, c);
switch (a) {
case "SliceLabelPositionMode":
this.u9((d) => {
if (d.eq) {
this.ce.setCollisionMode(d, this.ah8);
}
});
break;
case "SliceLabelContentSeparator":
this.ald((d) => d.aag = this.aks);
break;
case "SliceLabelContentMode":
this.ald((d) => d.zh = this.aip);
break;
case "LegendSliceLabelContentMode":
this.ald((d) => d.zi = this.aio);
break;
case "SliceLabelFormat":
this.ald((d) => d.aa5 = this.aku);
break;
case "SliceLabelFormatSpecifiers":
this.ald((d) => d.yw = this.ah4);
break;
case "OthersSliceLabelFormat":
this.ald((d) => d.aa2 = this.akn);
break;
case "OthersSliceLabelFormatSpecifiers":
this.ald((d) => d.yv = this.ah3);
break;
case "LegendSliceLabelFormat":
this.ald((d) => d.aav = this.aku);
break;
case "LegendSliceLabelFormatSpecifiers":
this.ald((d) => d.yt = this.ah4);
break;
case "LegendOthersSliceLabelFormat":
this.ald((d) => d.aaz = this.aka);
break;
case "LegendOthersSliceLabelFormatSpecifiers":
this.ald((d) => d.yu = this.ah1);
break;
case "SweepDirection":
if (this.angleAxis != null) {
if (this.aij != 0) {
if (this.aij == 1) {
this.angleAxis.ch = false;
}
else {
this.angleAxis.ch = true;
}
}
else {
this.angleAxis.ch = this.aa2;
}
}
break;
case "StartAngle":
if (this.angleAxis != null) {
this.angleAxis.ne = isNaN_(this.ajh) ? 0 : this.ajh;
}
break;
case "RadiusExtent":
if (this.valueAxis != null) {
this.valueAxis.oh = isNaN_(this.ajg) ? 0.65 : this.ajg;
}
break;
case "OthersCategoryText":
if (this.angleAxis != null) {
this.angleAxis.ol = this.akj;
}
break;
case "OthersCategoryType":
if (this.angleAxis != null) {
this.angleAxis.n0 = this.aih;
}
break;
case "OthersCategoryThreshold":
if (this.angleAxis != null) {
this.angleAxis.oe = this.ajf;
}
break;
case "InnerExtent":
if (this.valueAxis != null) {
this.valueAxis.og = this.aje;
}
break;
case "LightSliceLabelColor":
this.u6((d) => {
if (d.eq) {
this.ce.setCalloutLightColor(d, this.alm);
}
});
break;
case "DarkSliceLabelColor":
this.u6((d) => {
if (d.eq) {
this.ce.setCalloutDarkColor(d, this.all);
}
});
break;
case "ValueMemberPath":
if (c != null) {
this.vb((d) => {
if (typeCast(AnchoredRadialSeries.$, d) !== null) {
let e = d;
e.ac0 = this.ala;
}
});
this.angleAxis.or = this.ala;
}
else {
this.wk();
}
break;
case "LabelMemberPath":
if (c != null) {
let d = this.aj5;
this.angleAxis.f2 = d;
}
else {
this.wk();
}
break;
case "LegendLabelMemberPath":
if (c != null) {
this.vb((e) => {
if (typeCast(RadialPieSeries.$, e) !== null) {
let f = e;
f.ad3 = this.aj8;
}
});
}
else {
this.wk();
}
break;
case "AngleAxisInterval":
this.angleAxis.nb = this.ajc;
break;
case "ValueAxisInterval":
this.valueAxis.l8 = this.ajk;
break;
case "ValueAxisFavorLabellingScaleEnd":
this.valueAxis.lj = this.ai0;
break;
case "ValueAxisAutoRangeBufferMode":
this.valueAxis.ky = this.ah6;
break;
case "AngleAxisMinorInterval":
this.angleAxis.nc = this.ajd;
break;
case "ValueAxisMinorInterval":
this.valueAxis.md = this.ajn;
break;
case "ValueAxisIsLogarithmic":
this.valueAxis.lo = this.ai1;
break;
case "ValueAxisLogarithmBase":
this.valueAxis.mm = this.ajp;
break;
case "ValueAxisMinimumValue":
this.valueAxis.mc = this.ajm;
break;
case "ValueAxisMaximumValue":
this.valueAxis.mb = this.ajl;
break;
case "MarkerCollision":
this.vc((e, f) => this.ur(e, f));
break;
case "ValueAxisAbbreviateLargeNumbers":
this.agg((e) => e.lf = this.aiz);
break;
case "FireMouseLeaveOnManipulationStart":
this.v1((e) => e.ev = this.aix);
break;
}
}
get aku() {
return this.ajx;
}
set aku(a) {
let b = this.aku;
if (a != b) {
this.ajx = a;
this.wd("SliceLabelFormat", b, this.aku);
}
}
get ah4() {
return this.ah0;
}
set ah4(a) {
let b = this.ah4;
if (a != b) {
this.ah0 = a;
this.wd("SliceLabelFormatSpecifiers", b, this.ah4);
}
}
get ake() {
return this.ajt;
}
set ake(a) {
let b = this.ake;
if (a != b) {
this.ajt = a;
this.wd("LegendSliceLabelFormat", b, this.ake);
}
}
get ah2() {
return this.ahy;
}
set ah2(a) {
let b = this.ah2;
if (a != b) {
this.ahy = a;
this.wd("LegendSliceLabelFormatSpecifiers", b, this.ah2);
}
}
get akn() {
return this.ajv;
}
set akn(a) {
let b = this.akn;
if (a != b) {
this.ajv = a;
this.wd("OthersSliceLabelFormat", b, this.akn);
}
}
get ah3() {
return this.ahz;
}
set ah3(a) {
let b = this.ah3;
if (a != b) {
this.ahz = a;
this.wd("OthersSliceLabelFormatSpecifiers", b, this.ah3);
}
}
get aka() {
return this.ajs;
}
set aka(a) {
let b = this.aka;
if (a != b) {
this.ajs = a;
this.wd("LegendOthersSliceLabelFormat", b, this.aka);
}
}
get ah1() {
return this.ahx;
}
set ah1(a) {
let b = this.ah1;
if (a != b) {
this.ahx = a;
this.wd("LegendOthersSliceLabelFormatSpecifiers", b, this.ah1);
}
}
get aje() {
return this.ai4;
}
set aje(a) {
let b = this.aje;
if (a != b) {
this.ai4 = a;
this.wd("InnerExtent", b, this.aje);
}
}
get aij() {
return this.aii;
}
set aij(a) {
let b = this.aij;
if (a != b) {
this.aii = a;
this.wd("SweepDirection", enumGetBox(PieChartSweepDirection_$type, b), enumGetBox(PieChartSweepDirection_$type, this.aij));
}
}
get ah8() {
return this.ah7;
}
set ah8(a) {
let b = this.ah8;
if (a != b) {
this.ah7 = a;
this.wd("SliceLabelPositionMode", enumGetBox(CalloutCollisionMode_$type, b), enumGetBox(CalloutCollisionMode_$type, this.ah8));
}
}
get alm() {
return this.alk;
}
set alm(a) {
let b = this.alm;
if (a != b) {
this.alk = a;
this.wd("LightSliceLabelColor", b, this.alm);
}
}
get all() {
return this.alj;
}
set all(a) {
let b = this.all;
if (a != b) {
this.alj = a;
this.wd("DarkSliceLabelColor", b, this.all);
}
}
get ala() {
return this.ajy;
}
set ala(a) {
let b = this.ala;
if (a != b) {
this.ajy = a;
this.wd("ValueMemberPath", b, this.ala);
}
}
get aj8() {
return this.ajr;
}
set aj8(a) {
let b = this.ajr;
if (a != b) {
this.ajr = a;
this.wd("LegendLabelMemberPath", b, this.ajr);
}
}
get aic() {
return this.aib;
}
set aic(a) {
let b = this.aib;
if (a != b) {
this.aib = a;
this.wd("LegendEmptyValuesMode", enumGetBox(LegendEmptyValuesMode_$type, b), this.ajr);
}
}
get aih() {
return this.aig;
}
set aih(a) {
let b = this.aih;
if (a != b) {
this.aig = a;
this.wd("OthersCategoryType", enumGetBox(OthersCategoryType_$type, b), enumGetBox(OthersCategoryType_$type, this.aih));
}
}
get ajf() {
return this.ai5;
}
set ajf(a) {
let b = this.ajf;
if (a != b) {
this.ai5 = a;
this.wd("OthersCategoryThreshold", b, this.ajf);
}
}
get akj() {
return this.aju;
}
set akj(a) {
let b = this.akj;
if (a != b) {
this.aju = a;
this.wd("OthersCategoryText", b, this.akj);
}
}
aif() {
let a = new OthersCategoryContext();
if (this.angleAxis != null && this.angleAxis.kv != null) {
let b = new List$1(Base.$, 0);
for (let c = 0; c < this.angleAxis.kv.count; c++) {
if (this.angleAxis.isOthersValue(c)) {
b.add1(this.angleAxis.kv.item(c));
}
}
a.items = b.toArray();
}
return a;
}
get aj5() {
return this.ajq;
}
set aj5(a) {
let b = this.aj5;
if (a != b) {
this.ajq = a;
this.wd("LabelMemberPath", b, this.aj5);
}
}
get ai0() {
return this.aiu;
}
set ai0(a) {
let b = this.ai0;
if (a != b) {
this.aiu = a;
this.wd("ValueAxisFavorLabellingScaleEnd", b, this.ai0);
}
}
get ah6() {
return this.ah5;
}
set ah6(a) {
let b = this.ah6;
if (a != b) {
this.ah5 = a;
this.wd("ValueAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ah6));
}
}
get ajc() {
return this.ai2;
}
set ajc(a) {
let b = this.ajc;
if (a != b) {
this.ai2 = a;
this.wd("AngleAxisInterval", b, this.ajc);
}
}
get ajd() {
return this.ai3;
}
set ajd(a) {
let b = this.ajd;
if (a != b) {
this.ai3 = a;
this.wd("AngleAxisMinorInterval", b, this.ajd);
}
}
get ajk() {
return this.ai8;
}
set ajk(a) {
let b = this.ajk;
if (a != b) {
this.ai8 = a;
this.wd("ValueAxisInterval", b, this.ajk);
}
}
get ai1() {
return this.aiv;
}
set ai1(a) {
let b = this.ai1;
if (a != b) {
this.aiv = a;
this.wd("ValueAxisIsLogarithmic", b, this.ai1);
}
}
get ajp() {
return this.ajo;
}
set ajp(a) {
let b = this.ajp;
if (a != b) {
this.ajo = a;
this.wd("ValueAxisLogarithmBase", b, this.ajp);
}
}
get ajm() {
return this.aja;
}
set ajm(a) {
let b = this.ajm;
if (a != b) {
this.aja = a;
this.wd("ValueAxisMinimumValue", b, this.ajm);
}
}
get ajl() {
return this.ai9;
}
set ajl(a) {
let b = this.ajl;
if (a != b) {
this.ai9 = a;
this.wd("ValueAxisMaximumValue", b, this.ajl);
}
}
get ajn() {
return this.ajb;
}
set ajn(a) {
let b = this.ajn;
if (a != b) {
this.ajb = a;
this.wd("ValueAxisMinorInterval", b, this.ajn);
}
}
get ajj() {
return this.valueAxis.l4;
}
get aji() {
return this.valueAxis.l3;
}
get ajg() {
return this.ai6;
}
set ajg(a) {
let b = this.ajg;
if (a != b) {
this.ai6 = a;
this.wd("RadiusExtent", b, this.ajg);
}
}
get ajh() {
return this.ai7;
}
set ajh(a) {
let b = this.ajh;
if (a != b) {
this.ai7 = a;
this.wd("StartAngle", b, this.ajh);
}
}
get aks() {
return this.ajw;
}
set aks(a) {
let b = this.aks;
if (a != b) {
this.ajw = a;
this.wd("SliceLabelContentSeparator", b, this.aks);
}
}
get aip() {
return this.ain;
}
set aip(a) {
let b = this.aip;
if (a != b) {
this.ain = a;
this.wd("SliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.aip));
}
}
get aio() {
return this.aim;
}
set aio(a) {
let b = this.aio;
if (a != b) {
this.aim = a;
this.wd("LegendSliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.aio));
}
}
get aiw() {
return this.air;
}
set aiw(a) {
let b = this.aiw;
if (a != b) {
this.air = a;
this.wd("AngleAxisFavorLabellingScaleEnd", b, this.aiw);
}
}
get aiz() {
return this.ait;
}
set aiz(a) {
let b = this.aiz;
if (a != b) {
this.ait = a;
this.wd("ValueAxisAbbreviateLargeNumbers", b, this.aiz);
}
}
get aia() {
return this.ah9;
}
set aia(a) {
let b = this.ah9;
if (a != b) {
this.ah9 = a;
this.wd("MarkerCollision", enumGetBox(CollisionAvoidanceType_$type, b), enumGetBox(CollisionAvoidanceType_$type, this.ah9));
}
}
get aix() {
return this.ais;
}
set aix(a) {
let b = this.ais;
if (a != b) {
this.ais = a;
this.wd("FireMouseLeaveOnManipulationStart", b, this.ais);
}
}
}
DataPieBaseChart.$t = markType(DataPieBaseChart, 'DataPieBaseChart', RadialBaseChart.$);
return DataPieBaseChart;
})();