igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
972 lines (971 loc) • 30.3 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-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 { List$1 } from "igniteui-react-core";
import { RadialPieSeries } from "./RadialPieSeries";
import { AnchoredRadialSeries } from "./AnchoredRadialSeries";
import { AxisLabelSettings } from "./AxisLabelSettings";
import { OthersCategoryContext } from "./OthersCategoryContext";
import { isNaN_ } from "igniteui-react-core";
/**
* @hidden
*/
export let DataPieBaseChart = /*@__PURE__*/ (() => {
class DataPieBaseChart extends RadialBaseChart {
constructor() {
super();
this.akg = null;
this.aib = null;
this.akc = null;
this.ah9 = null;
this.ake = null;
this.aia = null;
this.akb = null;
this.ah8 = null;
this.ajh = 0;
this.ait = 0;
this.aii = 6;
this.al7 = null;
this.al6 = null;
this.akh = null;
this.aka = null;
this.aim = 0;
this.air = 1;
this.aji = 3;
this.akd = null;
this.aj9 = null;
this.ai6 = true;
this.aig = 0;
this.ajf = 0;
this.ajg = 0;
this.ajo = 0;
this.ai7 = false;
this.aj7 = 10;
this.ajq = NaN;
this.ajp = NaN;
this.ajr = 0;
this.ajj = NaN;
this.ajn = NaN;
this.akf = " - ";
this.aiy = 0;
this.aix = 0;
this.ajk = 2;
this.ajl = 2;
this.ajm = NaN;
this.ai4 = false;
this.ai2 = true;
this.ai5 = true;
this.aik = 0;
this.ai3 = false;
}
hl() {
return true;
}
al2(a) {
this.al3((b, c) => a(b));
}
al3(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);
}
}
}
al0(a) {
this.al1((b, c) => a(b));
}
al1(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);
}
}
}
xl() {
let a = this.bg.dataSeries != null ? this.bg.dataSeries.count : 0;
super.xl();
if (this.ako != null) {
let b = this.ako;
this.angleAxis.hg = b;
}
else {
this.angleAxis.hg = this.adp == null ? RadialBaseChart.ae8(this.angleAxis, this.bg.dataSeries) : this.adp;
}
this.angleAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
if (this.alx != null) {
this.angleAxis.sd = this.alx;
}
else {
this.angleAxis.sd = (this.dataChart != null && this.dataChart.series.count > 0 && typeCast(RadialPieSeries.$, this.dataChart.series._inner[0]) !== null) ? this.dataChart.series._inner[0].ac6 : null;
}
}
c3(a, b) {
if (this.c6 == null || this.c6.count == 0) {
return 13;
}
let c = super.c3(a, b);
if (c == 1) {
return 13;
}
return c;
}
xj(a) {
}
hh(a) {
if (!super.hh(a)) {
return false;
}
return true;
}
xm() {
this.valueAxis.pb = this.aje;
this.valueAxis.qe = this.aj8;
}
get angleAxis() {
return this.aiv;
}
set angleAxis(a) {
let b = this.angleAxis;
if (a != b) {
this.aiv = a;
this.wn("AngleAxis", b, this.angleAxis);
}
}
get valueAxis() {
return this.aio;
}
set valueAxis(a) {
let b = this.valueAxis;
if (a != b) {
this.aio = a;
this.wn("ValueAxis", b, this.valueAxis);
}
}
get_aja() {
return false;
}
get aja() {
return this.get_aja();
}
dd(a, b) {
let c = null;
if (b == 35) {
c = this.ai1(a, b);
}
if (a.index > 0) {
if (!this.aja) {
if (c != null) {
c.o8();
}
return null;
}
}
return c;
}
vx(a, b) {
super.vx(a, b);
if (this.g5(a) && this.cf.isCalloutLayer(a)) {
if (this.al9 != null) {
this.cf.setCalloutLightColor(a, this.al9);
}
if (this.al8 != null) {
this.cf.setCalloutDarkColor(a, this.al8);
}
let c = this.ah;
if (this.aij != 0) {
c = this.aij;
}
this.cf.setCollisionMode(a, c);
}
}
ai1(a, b) {
let c = null;
if (b == 35) {
c = this.dg(35);
}
else {
c = this.dg(35);
}
if (this.alx != null) {
c.ac6 = this.alx;
}
else {
c.ac6 = a.getMemberPathFor(0);
}
if (this.akr != null) {
c.aeb = this.akr;
}
c.adz = this.ain;
c.za = this.angleAxis;
c.zg = this.valueAxis;
c.ha = true;
c.acq = true;
c.abb = this.alg;
c.y2 = this.aif;
c.aa8 = this.ak6;
c.y1 = this.aie;
c.aa1 = this.akx;
c.yz = this.aid;
c.aa5 = this.akt;
c.y0 = this.aic;
c.zn = this.ai0;
c.zo = this.aiz;
c.aam = this.ale;
c.ad6 = this.ajx;
c.ad7 = this.ajy;
c.jp = this.ajz;
c.ad5 = this.ajb;
return c;
}
aa1() {
return this.angleAxis;
}
aa2() {
return this.valueAxis;
}
u7() {
this.angleAxis = new ProportionalCategoryAngleAxis();
this.angleAxis.name = "angleAxis";
let a = this.angleAxis;
a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.al4));
this.angleAxis.or = 0;
this.valueAxis = new NumericRadiusAxis();
this.valueAxis.name = "valueAxis";
let b = this.valueAxis;
b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.al5));
if (this.angleAxis.a3 == null) {
this.angleAxis.a3 = new AxisLabelSettings();
}
if (this.valueAxis.a3 == null) {
this.valueAxis.a3 = new AxisLabelSettings();
}
}
al4(a, b) {
switch (b.propertyName) {
case "ActualMinimumValue":
this.w6("AngleAxisActualMinimum");
break;
case "ActualMaximumValue":
this.w6("AngleAxisActualMaximum");
break;
}
}
al5(a, b) {
switch (b.propertyName) {
case "ActualMinimumValue":
this.w6("ValueAxisActualMinimum");
break;
case "ActualMaximumValue":
this.w6("ValueAxisActualMaximum");
break;
}
}
u1(a, b) {
let c = typeCast(RadialBase.$, a);
if (c != null) {
c.xl = this.c3(a, b);
}
}
agk(a) {
super.agk(a);
a.o1 = this.ajc;
a.o6 = this.ajd;
a.sk = this.aju;
if (!isNaN_(this.ajw)) {
a.sl = this.ajw;
}
else {
a.sl = 0.65;
}
}
agi(a) {
super.agi(a);
if (!a.dj) {
return;
}
a.r7 = this.ak2;
a.rm = this.ais;
a.r0 = this.ajv;
if (!isNaN_(this.aj0)) {
a.q0 = this.aj0;
}
if (this.aiu != 0) {
if (this.aiu == 1) {
a.df = false;
}
else {
a.df = true;
}
}
}
vs(a) {
super.vs(a);
a.fb = this.ai9;
}
wn(a, b, c) {
super.wn(a, b, c);
switch (a) {
case "SliceLabelPositionMode":
this.vj((d) => {
if (d.eq) {
this.cf.setCollisionMode(d, this.aij);
}
});
break;
case "SliceLabelContentSeparator":
this.al0((d) => d.aam = this.ale);
break;
case "SliceLabelContentMode":
this.al0((d) => d.zn = this.ai0);
break;
case "LegendSliceLabelContentMode":
this.al0((d) => d.zo = this.aiz);
break;
case "SliceLabelFormat":
this.al0((d) => d.abb = this.alg);
break;
case "SliceLabelFormatSpecifiers":
this.al0((d) => d.y2 = this.aif);
break;
case "OthersSliceLabelFormat":
this.al0((d) => d.aa8 = this.ak6);
break;
case "OthersSliceLabelFormatSpecifiers":
this.al0((d) => d.y1 = this.aie);
break;
case "LegendSliceLabelFormat":
this.al0((d) => d.aa1 = this.alg);
break;
case "LegendSliceLabelFormatSpecifiers":
this.al0((d) => d.yz = this.aif);
break;
case "LegendOthersSliceLabelFormat":
this.al0((d) => d.aa5 = this.akt);
break;
case "LegendOthersSliceLabelFormatSpecifiers":
this.al0((d) => d.y0 = this.aic);
break;
case "RadiusX":
this.al0((d) => d.ad6 = this.ajx);
break;
case "RadiusY":
this.al0((d) => d.ad7 = this.ajy);
break;
case "SelectionThickness":
this.al0((d) => d.jp = this.ajz);
break;
case "UseInsetOutlines":
this.al0((d) => d.ad5 = this.ajb);
break;
case "SweepDirection":
if (this.angleAxis != null) {
if (this.aiu != 0) {
if (this.aiu == 1) {
this.angleAxis.df = false;
}
else {
this.angleAxis.df = true;
}
}
else {
this.angleAxis.df = this.abd;
}
}
break;
case "StartAngle":
if (this.angleAxis != null) {
this.angleAxis.q0 = isNaN_(this.aj0) ? 0 : this.aj0;
}
break;
case "RadiusExtent":
if (this.valueAxis != null) {
this.valueAxis.sl = isNaN_(this.ajw) ? 0.65 : this.ajw;
}
break;
case "OthersCategoryText":
if (this.angleAxis != null) {
this.angleAxis.r7 = this.ak2;
}
break;
case "OthersCategoryType":
if (this.angleAxis != null) {
this.angleAxis.rm = this.ais;
}
break;
case "OthersCategoryThreshold":
if (this.angleAxis != null) {
this.angleAxis.r0 = this.ajv;
}
break;
case "InnerExtent":
if (this.valueAxis != null) {
this.valueAxis.sk = this.aju;
}
break;
case "LightSliceLabelColor":
this.vg((d) => {
if (d.eq) {
this.cf.setCalloutLightColor(d, this.al9);
}
});
break;
case "DarkSliceLabelColor":
this.vg((d) => {
if (d.eq) {
this.cf.setCalloutDarkColor(d, this.al8);
}
});
break;
case "ValueMemberPath":
if (c != null) {
this.vl((d) => {
if (typeCast(AnchoredRadialSeries.$, d) !== null) {
let e = d;
e.ac6 = this.alx;
}
});
this.angleAxis.sd = this.alx;
}
else {
this.wu();
}
break;
case "LabelMemberPath":
if (c != null) {
let d = this.ako;
this.angleAxis.hg = d;
}
else {
this.wu();
}
break;
case "LegendLabelMemberPath":
if (c != null) {
this.vl((e) => {
if (typeCast(RadialPieSeries.$, e) !== null) {
let f = e;
f.aeb = this.akr;
}
});
}
else {
this.wu();
}
break;
case "AngleAxisInterval":
this.angleAxis.qx = this.ajs;
break;
case "ValueAxisInterval":
this.valueAxis.pz = this.aj3;
break;
case "ValueAxisFavorLabellingScaleEnd":
this.valueAxis.o6 = this.ajd;
break;
case "ValueAxisAutoRangeBufferMode":
this.valueAxis.ok = this.aih;
break;
case "AngleAxisMinorInterval":
this.angleAxis.qy = this.ajt;
break;
case "ValueAxisMinorInterval":
this.valueAxis.p4 = this.aj6;
break;
case "ValueAxisIsLogarithmic":
this.valueAxis.pb = this.aje;
break;
case "ValueAxisLogarithmBase":
this.valueAxis.qe = this.aj8;
break;
case "ValueAxisMinimumValue":
this.valueAxis.p3 = this.aj5;
break;
case "ValueAxisMaximumValue":
this.valueAxis.p2 = this.aj4;
break;
case "MarkerCollision":
this.vm((e, f) => this.u1(e, f));
break;
case "ValueAxisAbbreviateLargeNumbers":
this.agr((e) => e.o1 = this.ajc);
break;
case "FireMouseLeaveOnManipulationStart":
this.wb((e) => e.fb = this.ai9);
break;
}
}
get alg() {
return this.akg;
}
set alg(a) {
let b = this.alg;
if (a != b) {
this.akg = a;
this.wn("SliceLabelFormat", b, this.alg);
}
}
get aif() {
return this.aib;
}
set aif(a) {
let b = this.aif;
if (a != b) {
this.aib = a;
this.wn("SliceLabelFormatSpecifiers", b, this.aif);
}
}
get akx() {
return this.akc;
}
set akx(a) {
let b = this.akx;
if (a != b) {
this.akc = a;
this.wn("LegendSliceLabelFormat", b, this.akx);
}
}
get aid() {
return this.ah9;
}
set aid(a) {
let b = this.aid;
if (a != b) {
this.ah9 = a;
this.wn("LegendSliceLabelFormatSpecifiers", b, this.aid);
}
}
get ak6() {
return this.ake;
}
set ak6(a) {
let b = this.ak6;
if (a != b) {
this.ake = a;
this.wn("OthersSliceLabelFormat", b, this.ak6);
}
}
get aie() {
return this.aia;
}
set aie(a) {
let b = this.aie;
if (a != b) {
this.aia = a;
this.wn("OthersSliceLabelFormatSpecifiers", b, this.aie);
}
}
get akt() {
return this.akb;
}
set akt(a) {
let b = this.akt;
if (a != b) {
this.akb = a;
this.wn("LegendOthersSliceLabelFormat", b, this.akt);
}
}
get aic() {
return this.ah8;
}
set aic(a) {
let b = this.aic;
if (a != b) {
this.ah8 = a;
this.wn("LegendOthersSliceLabelFormatSpecifiers", b, this.aic);
}
}
get aju() {
return this.ajh;
}
set aju(a) {
let b = this.aju;
if (a != b) {
this.ajh = a;
this.wn("InnerExtent", b, this.aju);
}
}
get aiu() {
return this.ait;
}
set aiu(a) {
let b = this.aiu;
if (a != b) {
this.ait = a;
this.wn("SweepDirection", enumGetBox(PieChartSweepDirection_$type, b), enumGetBox(PieChartSweepDirection_$type, this.aiu));
}
}
get aij() {
return this.aii;
}
set aij(a) {
let b = this.aij;
if (a != b) {
this.aii = a;
this.wn("SliceLabelPositionMode", enumGetBox(CalloutCollisionMode_$type, b), enumGetBox(CalloutCollisionMode_$type, this.aij));
}
}
get al9() {
return this.al7;
}
set al9(a) {
let b = this.al9;
if (a != b) {
this.al7 = a;
this.wn("LightSliceLabelColor", b, this.al9);
}
}
get al8() {
return this.al6;
}
set al8(a) {
let b = this.al8;
if (a != b) {
this.al6 = a;
this.wn("DarkSliceLabelColor", b, this.al8);
}
}
get alx() {
return this.akh;
}
set alx(a) {
let b = this.alx;
if (a != b) {
this.akh = a;
this.wn("ValueMemberPath", b, this.alx);
}
}
get akr() {
return this.aka;
}
set akr(a) {
let b = this.aka;
if (a != b) {
this.aka = a;
this.wn("LegendLabelMemberPath", b, this.aka);
}
}
get ain() {
return this.aim;
}
set ain(a) {
let b = this.aim;
if (a != b) {
this.aim = a;
this.wn("LegendEmptyValuesMode", enumGetBox(LegendEmptyValuesMode_$type, b), this.aka);
}
}
get ais() {
return this.air;
}
set ais(a) {
let b = this.ais;
if (a != b) {
this.air = a;
this.wn("OthersCategoryType", enumGetBox(OthersCategoryType_$type, b), enumGetBox(OthersCategoryType_$type, this.ais));
}
}
get ajv() {
return this.aji;
}
set ajv(a) {
let b = this.ajv;
if (a != b) {
this.aji = a;
this.wn("OthersCategoryThreshold", b, this.ajv);
}
}
get ak2() {
return this.akd;
}
set ak2(a) {
let b = this.ak2;
if (a != b) {
this.akd = a;
this.wn("OthersCategoryText", b, this.ak2);
}
}
aiq() {
let a = new OthersCategoryContext();
if (this.angleAxis != null && this.angleAxis.oh != null) {
let b = new List$1(Base.$, 0);
for (let c = 0; c < this.angleAxis.oh.count; c++) {
if (this.angleAxis.isOthersValue(c)) {
b.add1(this.angleAxis.oh.item(c));
}
}
a.items = b.toArray();
}
return a;
}
get ako() {
return this.aj9;
}
set ako(a) {
let b = this.ako;
if (a != b) {
this.aj9 = a;
this.wn("LabelMemberPath", b, this.ako);
}
}
get ajd() {
return this.ai6;
}
set ajd(a) {
let b = this.ajd;
if (a != b) {
this.ai6 = a;
this.wn("ValueAxisFavorLabellingScaleEnd", b, this.ajd);
}
}
get aih() {
return this.aig;
}
set aih(a) {
let b = this.aih;
if (a != b) {
this.aig = a;
this.wn("ValueAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.aih));
}
}
get ajs() {
return this.ajf;
}
set ajs(a) {
let b = this.ajs;
if (a != b) {
this.ajf = a;
this.wn("AngleAxisInterval", b, this.ajs);
}
}
get ajt() {
return this.ajg;
}
set ajt(a) {
let b = this.ajt;
if (a != b) {
this.ajg = a;
this.wn("AngleAxisMinorInterval", b, this.ajt);
}
}
get aj3() {
return this.ajo;
}
set aj3(a) {
let b = this.aj3;
if (a != b) {
this.ajo = a;
this.wn("ValueAxisInterval", b, this.aj3);
}
}
get aje() {
return this.ai7;
}
set aje(a) {
let b = this.aje;
if (a != b) {
this.ai7 = a;
this.wn("ValueAxisIsLogarithmic", b, this.aje);
}
}
get aj8() {
return this.aj7;
}
set aj8(a) {
let b = this.aj8;
if (a != b) {
this.aj7 = a;
this.wn("ValueAxisLogarithmBase", b, this.aj8);
}
}
get aj5() {
return this.ajq;
}
set aj5(a) {
let b = this.aj5;
if (a != b) {
this.ajq = a;
this.wn("ValueAxisMinimumValue", b, this.aj5);
}
}
get aj4() {
return this.ajp;
}
set aj4(a) {
let b = this.aj4;
if (a != b) {
this.ajp = a;
this.wn("ValueAxisMaximumValue", b, this.aj4);
}
}
get aj6() {
return this.ajr;
}
set aj6(a) {
let b = this.aj6;
if (a != b) {
this.ajr = a;
this.wn("ValueAxisMinorInterval", b, this.aj6);
}
}
get aj2() {
return this.valueAxis.pr;
}
get aj1() {
return this.valueAxis.pq;
}
get ajw() {
return this.ajj;
}
set ajw(a) {
let b = this.ajw;
if (a != b) {
this.ajj = a;
this.wn("RadiusExtent", b, this.ajw);
}
}
get aj0() {
return this.ajn;
}
set aj0(a) {
let b = this.aj0;
if (a != b) {
this.ajn = a;
this.wn("StartAngle", b, this.aj0);
}
}
get ale() {
return this.akf;
}
set ale(a) {
let b = this.ale;
if (a != b) {
this.akf = a;
this.wn("SliceLabelContentSeparator", b, this.ale);
}
}
get ai0() {
return this.aiy;
}
set ai0(a) {
let b = this.ai0;
if (a != b) {
this.aiy = a;
this.wn("SliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.ai0));
}
}
get aiz() {
return this.aix;
}
set aiz(a) {
let b = this.aiz;
if (a != b) {
this.aix = a;
this.wn("LegendSliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.aiz));
}
}
get ajx() {
return this.ajk;
}
set ajx(a) {
let b = this.ajk;
if (a != b) {
this.ajk = a;
this.wn("RadiusX", b, this.ajk);
}
}
get ajy() {
return this.ajl;
}
set ajy(a) {
let b = this.ajl;
if (a != b) {
this.ajl = a;
this.wn("RadiusY", b, this.ajl);
}
}
get ajz() {
return this.ajm;
}
set ajz(a) {
let b = this.ajm;
if (a != b) {
this.ajm = a;
this.wn("SelectionThickness", b, this.ajm);
}
}
get ajb() {
return this.ai4;
}
set ajb(a) {
let b = this.ai4;
if (a != b) {
this.ai4 = a;
this.wn("UseInsetOutlines", b, this.ai4);
}
}
get ai8() {
return this.ai2;
}
set ai8(a) {
let b = this.ai8;
if (a != b) {
this.ai2 = a;
this.wn("AngleAxisFavorLabellingScaleEnd", b, this.ai8);
}
}
get ajc() {
return this.ai5;
}
set ajc(a) {
let b = this.ajc;
if (a != b) {
this.ai5 = a;
this.wn("ValueAxisAbbreviateLargeNumbers", b, this.ajc);
}
}
get ail() {
return this.aik;
}
set ail(a) {
let b = this.aik;
if (a != b) {
this.aik = a;
this.wn("MarkerCollision", enumGetBox(CollisionAvoidanceType_$type, b), enumGetBox(CollisionAvoidanceType_$type, this.aik));
}
}
get ai9() {
return this.ai3;
}
set ai9(a) {
let b = this.ai3;
if (a != b) {
this.ai3 = a;
this.wn("FireMouseLeaveOnManipulationStart", b, this.ai3);
}
}
}
DataPieBaseChart.$t = /*@__PURE__*/ markType(DataPieBaseChart, 'DataPieBaseChart', RadialBaseChart.$);
return DataPieBaseChart;
})();