igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
876 lines (875 loc) • 27.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 { typeCast, runOn, delegateCombine, enumGetBox, markType } from "igniteui-react-core";
import { PieChartSweepDirection_$type } from "./PieChartSweepDirection";
import { CalloutCollisionMode_$type } from "igniteui-react-core";
import { LegendEmptyValuesMode_$type } from "igniteui-react-core";
import { OthersCategoryType_$type } from "igniteui-react-core";
import { AxisRangeBufferMode_$type } from "./AxisRangeBufferMode";
import { RadialLabelMode_$type } from "igniteui-react-core";
import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { RadialBase } from "./RadialBase";
import { RadialPieSeries } from "./RadialPieSeries";
import { AnchoredRadialSeries } from "./AnchoredRadialSeries";
import { AxisLabelSettings } from "./AxisLabelSettings";
import { isNaN_ } from "igniteui-react-core";
/**
* @hidden
*/
export let DataPieBaseChart = /*@__PURE__*/ (() => {
class DataPieBaseChart extends RadialBaseChart {
constructor() {
super();
this.ai8 = null;
this.ahe = null;
this.ai4 = null;
this.ahc = null;
this.ai6 = null;
this.ahd = null;
this.ai3 = null;
this.ahb = null;
this.aif = 0;
this.ahv = 0;
this.ahl = 6;
this.aku = null;
this.akt = null;
this.ai9 = null;
this.ai2 = null;
this.ahp = 0;
this.aht = 1;
this.aig = 3;
this.ai5 = null;
this.ai1 = null;
this.ah6 = true;
this.ahj = 0;
this.aid = 0;
this.aie = 0;
this.aij = 0;
this.ah7 = false;
this.aiz = 10;
this.ail = NaN;
this.aik = NaN;
this.aim = 0;
this.aih = NaN;
this.aii = NaN;
this.ai7 = " - ";
this.ah0 = 0;
this.ahz = 0;
this.ah4 = true;
this.ah5 = true;
this.ahn = 0;
}
hg() {
return true;
}
akp(a) {
this.akq((b, c) => a(b));
}
akq(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.ft) {
a(c, b);
}
}
}
akn(a) {
this.ako((b, c) => a(b));
}
ako(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.ft) {
a(c, b);
}
}
}
w0() {
let a = this.bf.dataSeries != null ? this.bf.dataSeries.count : 0;
super.w0();
if (this.ajf != null) {
let b = this.ajf;
this.angleAxis.f2 = b;
}
else {
this.angleAxis.f2 = this.acw == null ? RadialBaseChart.aed(this.angleAxis, this.bf.dataSeries) : this.acw;
}
this.angleAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
if (this.akk != null) {
this.angleAxis.ok = this.akk;
}
else {
this.angleAxis.ok = (this.dataChart != null && this.dataChart.series.count > 0 && typeCast(RadialPieSeries.$, this.dataChart.series._inner[0]) !== null) ? this.dataChart.series._inner[0].acz : 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;
}
wy(a) {
}
hc(a) {
if (!super.hc(a)) {
return false;
}
return true;
}
w1() {
this.valueAxis.lo = this.aic;
this.valueAxis.mm = this.ai0;
}
get angleAxis() {
return this.ahx;
}
set angleAxis(a) {
let b = this.angleAxis;
if (a != b) {
this.ahx = a;
this.v3("AngleAxis", b, this.angleAxis);
}
}
get valueAxis() {
return this.ahr;
}
set valueAxis(a) {
let b = this.valueAxis;
if (a != b) {
this.ahr = a;
this.v3("ValueAxis", b, this.valueAxis);
}
}
get_ah9() {
return false;
}
get ah9() {
return this.get_ah9();
}
dc(a, b) {
let c = null;
if (b == 35) {
c = this.ah3(a, b);
}
if (a.index > 0) {
if (!this.ah9) {
if (c != null) {
c.o2();
}
return null;
}
}
return c;
}
ve(a, b) {
super.ve(a, b);
if (this.g0(a) && this.ce.isCalloutLayer(a)) {
if (this.akw != null) {
this.ce.setCalloutLightColor(a, this.akw);
}
if (this.akv != null) {
this.ce.setCalloutDarkColor(a, this.akv);
}
let c = this.ah;
if (this.ahm != 0) {
c = this.ahm;
}
this.ce.setCollisionMode(a, c);
}
}
ah3(a, b) {
let c = null;
if (b == 35) {
c = this.df(35);
}
else {
c = this.df(35);
}
if (this.akk != null) {
c.acz = this.akk;
}
else {
c.acz = a.getMemberPathFor(0);
}
if (this.aji != null) {
c.ad2 = this.aji;
}
c.ads = this.ahq;
c.y1 = this.angleAxis;
c.y7 = this.valueAxis;
c.g9 = true;
c.acj = true;
c.aa4 = this.aj4;
c.yt = this.ahi;
c.aa1 = this.ajx;
c.ys = this.ahh;
c.aau = this.ajo;
c.yq = this.ahg;
c.aay = this.ajk;
c.yr = this.ahf;
c.zg = this.ah2;
c.zh = this.ah1;
c.aaf = this.aj2;
return c;
}
aag() {
return this.angleAxis;
}
aah() {
return this.valueAxis;
}
uo() {
this.angleAxis = new ProportionalCategoryAngleAxis();
this.angleAxis.name = "angleAxis";
let a = this.angleAxis;
a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.akr));
this.angleAxis.k5 = 0;
this.valueAxis = new NumericRadiusAxis();
this.valueAxis.name = "valueAxis";
let b = this.valueAxis;
b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.aks));
if (this.angleAxis.az == null) {
this.angleAxis.az = new AxisLabelSettings();
}
if (this.valueAxis.az == null) {
this.valueAxis.az = new AxisLabelSettings();
}
}
akr(a, b) {
switch (b.propertyName) {
case "ActualMinimumValue":
this.wl("AngleAxisActualMinimum");
break;
case "ActualMaximumValue":
this.wl("AngleAxisActualMaximum");
break;
}
}
aks(a, b) {
switch (b.propertyName) {
case "ActualMinimumValue":
this.wl("ValueAxisActualMinimum");
break;
case "ActualMaximumValue":
this.wl("ValueAxisActualMaximum");
break;
}
}
ui(a, b) {
let c = typeCast(RadialBase.$, a);
if (c != null) {
c.xc = this.c2(a, b);
}
}
afn(a) {
super.afn(a);
a.lf = this.aia;
a.lj = this.aib;
a.og = this.aip;
if (!isNaN_(this.air)) {
a.oh = this.air;
}
else {
a.oh = 0.65;
}
}
afl(a) {
super.afl(a);
a.oe = this.ajt;
a.ny = this.ahu;
a.ob = this.aiq;
if (!isNaN_(this.ais)) {
a.ne = this.ais;
}
if (this.ahw != 0) {
if (this.ahw == 1) {
a.ch = false;
}
else {
a.ch = true;
}
}
}
v3(a, b, c) {
super.v3(a, b, c);
switch (a) {
case "SliceLabelPositionMode":
this.u0((d) => {
if (d.ep) {
this.ce.setCollisionMode(d, this.ahm);
}
});
break;
case "SliceLabelContentSeparator":
this.akn((d) => d.aaf = this.aj2);
break;
case "SliceLabelContentMode":
this.akn((d) => d.zg = this.ah2);
break;
case "LegendSliceLabelContentMode":
this.akn((d) => d.zh = this.ah1);
break;
case "SliceLabelFormat":
this.akn((d) => d.aa4 = this.aj4);
break;
case "SliceLabelFormatSpecifiers":
this.akn((d) => d.yt = this.ahi);
break;
case "OthersSliceLabelFormat":
this.akn((d) => d.aa1 = this.ajx);
break;
case "OthersSliceLabelFormatSpecifiers":
this.akn((d) => d.ys = this.ahh);
break;
case "LegendSliceLabelFormat":
this.akn((d) => d.aau = this.aj4);
break;
case "LegendSliceLabelFormatSpecifiers":
this.akn((d) => d.yq = this.ahi);
break;
case "LegendOthersSliceLabelFormat":
this.akn((d) => d.aay = this.ajk);
break;
case "LegendOthersSliceLabelFormatSpecifiers":
this.akn((d) => d.yr = this.ahf);
break;
case "SweepDirection":
if (this.angleAxis != null) {
if (this.ahw != 0) {
if (this.ahw == 1) {
this.angleAxis.ch = false;
}
else {
this.angleAxis.ch = true;
}
}
else {
this.angleAxis.ch = this.aas;
}
}
break;
case "StartAngle":
if (this.angleAxis != null) {
this.angleAxis.ne = isNaN_(this.ais) ? 0 : this.ais;
}
break;
case "RadiusExtent":
if (this.valueAxis != null) {
this.valueAxis.oh = isNaN_(this.air) ? 0.65 : this.air;
}
break;
case "OthersCategoryText":
if (this.angleAxis != null) {
this.angleAxis.oe = this.ajt;
}
break;
case "OthersCategoryType":
if (this.angleAxis != null) {
this.angleAxis.ny = this.ahu;
}
break;
case "OthersCategoryThreshold":
if (this.angleAxis != null) {
this.angleAxis.ob = this.aiq;
}
break;
case "InnerExtent":
if (this.valueAxis != null) {
this.valueAxis.og = this.aip;
}
break;
case "LightSliceLabelColor":
this.ux((d) => {
if (d.ep) {
this.ce.setCalloutLightColor(d, this.akw);
}
});
break;
case "DarkSliceLabelColor":
this.ux((d) => {
if (d.ep) {
this.ce.setCalloutDarkColor(d, this.akv);
}
});
break;
case "ValueMemberPath":
if (c != null) {
this.u2((d) => {
if (typeCast(AnchoredRadialSeries.$, d) !== null) {
let e = d;
e.acz = this.akk;
}
});
this.angleAxis.ok = this.akk;
}
else {
this.wa();
}
break;
case "LabelMemberPath":
if (c != null) {
let d = this.ajf;
this.angleAxis.f2 = d;
}
else {
this.wa();
}
break;
case "LegendLabelMemberPath":
if (c != null) {
this.u2((e) => {
if (typeCast(RadialPieSeries.$, e) !== null) {
let f = e;
f.ad2 = this.aji;
}
});
}
else {
this.wa();
}
break;
case "AngleAxisInterval":
this.angleAxis.nb = this.ain;
break;
case "ValueAxisInterval":
this.valueAxis.l8 = this.aiv;
break;
case "ValueAxisFavorLabellingScaleEnd":
this.valueAxis.lj = this.aib;
break;
case "ValueAxisAutoRangeBufferMode":
this.valueAxis.ky = this.ahk;
break;
case "AngleAxisMinorInterval":
this.angleAxis.nc = this.aio;
break;
case "ValueAxisMinorInterval":
this.valueAxis.md = this.aiy;
break;
case "ValueAxisIsLogarithmic":
this.valueAxis.lo = this.aic;
break;
case "ValueAxisLogarithmBase":
this.valueAxis.mm = this.ai0;
break;
case "ValueAxisMinimumValue":
this.valueAxis.mc = this.aix;
break;
case "ValueAxisMaximumValue":
this.valueAxis.mb = this.aiw;
break;
case "MarkerCollision":
this.u3((e, f) => this.ui(e, f));
break;
case "ValueAxisAbbreviateLargeNumbers":
this.afu((e) => e.lf = this.aia);
break;
}
}
get aj4() {
return this.ai8;
}
set aj4(a) {
let b = this.aj4;
if (a != b) {
this.ai8 = a;
this.v3("SliceLabelFormat", b, this.aj4);
}
}
get ahi() {
return this.ahe;
}
set ahi(a) {
let b = this.ahi;
if (a != b) {
this.ahe = a;
this.v3("SliceLabelFormatSpecifiers", b, this.ahi);
}
}
get ajo() {
return this.ai4;
}
set ajo(a) {
let b = this.ajo;
if (a != b) {
this.ai4 = a;
this.v3("LegendSliceLabelFormat", b, this.ajo);
}
}
get ahg() {
return this.ahc;
}
set ahg(a) {
let b = this.ahg;
if (a != b) {
this.ahc = a;
this.v3("LegendSliceLabelFormatSpecifiers", b, this.ahg);
}
}
get ajx() {
return this.ai6;
}
set ajx(a) {
let b = this.ajx;
if (a != b) {
this.ai6 = a;
this.v3("OthersSliceLabelFormat", b, this.ajx);
}
}
get ahh() {
return this.ahd;
}
set ahh(a) {
let b = this.ahh;
if (a != b) {
this.ahd = a;
this.v3("OthersSliceLabelFormatSpecifiers", b, this.ahh);
}
}
get ajk() {
return this.ai3;
}
set ajk(a) {
let b = this.ajk;
if (a != b) {
this.ai3 = a;
this.v3("LegendOthersSliceLabelFormat", b, this.ajk);
}
}
get ahf() {
return this.ahb;
}
set ahf(a) {
let b = this.ahf;
if (a != b) {
this.ahb = a;
this.v3("LegendOthersSliceLabelFormatSpecifiers", b, this.ahf);
}
}
get aip() {
return this.aif;
}
set aip(a) {
let b = this.aip;
if (a != b) {
this.aif = a;
this.v3("InnerExtent", b, this.aip);
}
}
get ahw() {
return this.ahv;
}
set ahw(a) {
let b = this.ahw;
if (a != b) {
this.ahv = a;
this.v3("SweepDirection", enumGetBox(PieChartSweepDirection_$type, b), enumGetBox(PieChartSweepDirection_$type, this.ahw));
}
}
get ahm() {
return this.ahl;
}
set ahm(a) {
let b = this.ahm;
if (a != b) {
this.ahl = a;
this.v3("SliceLabelPositionMode", enumGetBox(CalloutCollisionMode_$type, b), enumGetBox(CalloutCollisionMode_$type, this.ahm));
}
}
get akw() {
return this.aku;
}
set akw(a) {
let b = this.akw;
if (a != b) {
this.aku = a;
this.v3("LightSliceLabelColor", b, this.akw);
}
}
get akv() {
return this.akt;
}
set akv(a) {
let b = this.akv;
if (a != b) {
this.akt = a;
this.v3("DarkSliceLabelColor", b, this.akv);
}
}
get akk() {
return this.ai9;
}
set akk(a) {
let b = this.akk;
if (a != b) {
this.ai9 = a;
this.v3("ValueMemberPath", b, this.akk);
}
}
get aji() {
return this.ai2;
}
set aji(a) {
let b = this.ai2;
if (a != b) {
this.ai2 = a;
this.v3("LegendLabelMemberPath", b, this.ai2);
}
}
get ahq() {
return this.ahp;
}
set ahq(a) {
let b = this.ahp;
if (a != b) {
this.ahp = a;
this.v3("LegendEmptyValuesMode", enumGetBox(LegendEmptyValuesMode_$type, b), this.ai2);
}
}
get ahu() {
return this.aht;
}
set ahu(a) {
let b = this.ahu;
if (a != b) {
this.aht = a;
this.v3("OthersCategoryType", enumGetBox(OthersCategoryType_$type, b), enumGetBox(OthersCategoryType_$type, this.ahu));
}
}
get aiq() {
return this.aig;
}
set aiq(a) {
let b = this.aiq;
if (a != b) {
this.aig = a;
this.v3("OthersCategoryThreshold", b, this.aiq);
}
}
get ajt() {
return this.ai5;
}
set ajt(a) {
let b = this.ajt;
if (a != b) {
this.ai5 = a;
this.v3("OthersCategoryText", b, this.ajt);
}
}
get ajf() {
return this.ai1;
}
set ajf(a) {
let b = this.ajf;
if (a != b) {
this.ai1 = a;
this.v3("LabelMemberPath", b, this.ajf);
}
}
get aib() {
return this.ah6;
}
set aib(a) {
let b = this.aib;
if (a != b) {
this.ah6 = a;
this.v3("ValueAxisFavorLabellingScaleEnd", b, this.aib);
}
}
get ahk() {
return this.ahj;
}
set ahk(a) {
let b = this.ahk;
if (a != b) {
this.ahj = a;
this.v3("ValueAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ahk));
}
}
get ain() {
return this.aid;
}
set ain(a) {
let b = this.ain;
if (a != b) {
this.aid = a;
this.v3("AngleAxisInterval", b, this.ain);
}
}
get aio() {
return this.aie;
}
set aio(a) {
let b = this.aio;
if (a != b) {
this.aie = a;
this.v3("AngleAxisMinorInterval", b, this.aio);
}
}
get aiv() {
return this.aij;
}
set aiv(a) {
let b = this.aiv;
if (a != b) {
this.aij = a;
this.v3("ValueAxisInterval", b, this.aiv);
}
}
get aic() {
return this.ah7;
}
set aic(a) {
let b = this.aic;
if (a != b) {
this.ah7 = a;
this.v3("ValueAxisIsLogarithmic", b, this.aic);
}
}
get ai0() {
return this.aiz;
}
set ai0(a) {
let b = this.ai0;
if (a != b) {
this.aiz = a;
this.v3("ValueAxisLogarithmBase", b, this.ai0);
}
}
get aix() {
return this.ail;
}
set aix(a) {
let b = this.aix;
if (a != b) {
this.ail = a;
this.v3("ValueAxisMinimumValue", b, this.aix);
}
}
get aiw() {
return this.aik;
}
set aiw(a) {
let b = this.aiw;
if (a != b) {
this.aik = a;
this.v3("ValueAxisMaximumValue", b, this.aiw);
}
}
get aiy() {
return this.aim;
}
set aiy(a) {
let b = this.aiy;
if (a != b) {
this.aim = a;
this.v3("ValueAxisMinorInterval", b, this.aiy);
}
}
get aiu() {
return this.valueAxis.l4;
}
get ait() {
return this.valueAxis.l3;
}
get air() {
return this.aih;
}
set air(a) {
let b = this.air;
if (a != b) {
this.aih = a;
this.v3("RadiusExtent", b, this.air);
}
}
get ais() {
return this.aii;
}
set ais(a) {
let b = this.ais;
if (a != b) {
this.aii = a;
this.v3("StartAngle", b, this.ais);
}
}
get aj2() {
return this.ai7;
}
set aj2(a) {
let b = this.aj2;
if (a != b) {
this.ai7 = a;
this.v3("SliceLabelContentSeparator", b, this.aj2);
}
}
get ah2() {
return this.ah0;
}
set ah2(a) {
let b = this.ah2;
if (a != b) {
this.ah0 = a;
this.v3("SliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.ah2));
}
}
get ah1() {
return this.ahz;
}
set ah1(a) {
let b = this.ah1;
if (a != b) {
this.ahz = a;
this.v3("LegendSliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.ah1));
}
}
get ah8() {
return this.ah4;
}
set ah8(a) {
let b = this.ah8;
if (a != b) {
this.ah4 = a;
this.v3("AngleAxisFavorLabellingScaleEnd", b, this.ah8);
}
}
get aia() {
return this.ah5;
}
set aia(a) {
let b = this.aia;
if (a != b) {
this.ah5 = a;
this.v3("ValueAxisAbbreviateLargeNumbers", b, this.aia);
}
}
get aho() {
return this.ahn;
}
set aho(a) {
let b = this.ahn;
if (a != b) {
this.ahn = a;
this.v3("MarkerCollision", enumGetBox(CollisionAvoidanceType_$type, b), enumGetBox(CollisionAvoidanceType_$type, this.ahn));
}
}
}
DataPieBaseChart.$t = /*@__PURE__*/ markType(DataPieBaseChart, 'DataPieBaseChart', RadialBaseChart.$);
return DataPieBaseChart;
})();