igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
909 lines (908 loc) • 28.6 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-webcomponents-core";
import { PieChartSweepDirection_$type } from "./PieChartSweepDirection";
import { CalloutCollisionMode_$type } from "igniteui-webcomponents-core";
import { LegendEmptyValuesMode_$type } from "igniteui-webcomponents-core";
import { OthersCategoryType_$type } from "igniteui-webcomponents-core";
import { AxisRangeBufferMode_$type } from "./AxisRangeBufferMode";
import { RadialLabelMode_$type } from "igniteui-webcomponents-core";
import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType";
import { RadialBase } from "./RadialBase";
import { List$1 } from "igniteui-webcomponents-core";
import { RadialPieSeries } from "./RadialPieSeries";
import { AnchoredRadialSeries } from "./AnchoredRadialSeries";
import { AxisLabelSettings } from "./AxisLabelSettings";
import { OthersCategoryContext } from "./OthersCategoryContext";
import { isNaN_ } from "igniteui-webcomponents-core";
/**
* @hidden
*/
export let DataPieBaseChart = /*@__PURE__*/ (() => {
class DataPieBaseChart extends RadialBaseChart {
constructor() {
super();
this.ajl = null;
this.aho = null;
this.ajh = null;
this.ahm = null;
this.ajj = null;
this.ahn = null;
this.ajg = null;
this.ahl = null;
this.ais = 0;
this.ah6 = 0;
this.ahv = 6;
this.ak8 = null;
this.ak7 = null;
this.ajm = null;
this.ajf = null;
this.ahz = 0;
this.ah4 = 1;
this.ait = 3;
this.aji = null;
this.aje = null;
this.aii = true;
this.aht = 0;
this.aiq = 0;
this.air = 0;
this.aiw = 0;
this.aij = false;
this.ajc = 10;
this.aiy = NaN;
this.aix = NaN;
this.aiz = 0;
this.aiu = NaN;
this.aiv = NaN;
this.ajk = " - ";
this.aib = 0;
this.aia = 0;
this.aif = true;
this.aih = true;
this.ahx = 0;
this.aig = false;
}
hg() {
return true;
}
ak3(a) {
this.ak4((b, c) => a(b));
}
ak4(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);
}
}
}
ak1(a) {
this.ak2((b, c) => a(b));
}
ak2(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.ajt != null) {
let b = this.ajt;
this.angleAxis.f2 = b;
}
else {
this.angleAxis.f2 = this.ac6 == null ? RadialBaseChart.aen(this.angleAxis, this.bf.dataSeries) : this.ac6;
}
this.angleAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
if (this.aky != null) {
this.angleAxis.or = this.aky;
}
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.aip;
this.valueAxis.mm = this.ajd;
}
get angleAxis() {
return this.ah8;
}
set angleAxis(a) {
let b = this.angleAxis;
if (a != b) {
this.ah8 = a;
this.wd("AngleAxis", b, this.angleAxis);
}
}
get valueAxis() {
return this.ah1;
}
set valueAxis(a) {
let b = this.valueAxis;
if (a != b) {
this.ah1 = a;
this.wd("ValueAxis", b, this.valueAxis);
}
}
get_aim() {
return false;
}
get aim() {
return this.get_aim();
}
dc(a, b) {
let c = null;
if (b == 35) {
c = this.aie(a, b);
}
if (a.index > 0) {
if (!this.aim) {
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.ala != null) {
this.ce.setCalloutLightColor(a, this.ala);
}
if (this.ak9 != null) {
this.ce.setCalloutDarkColor(a, this.ak9);
}
let c = this.ah;
if (this.ahw != 0) {
c = this.ahw;
}
this.ce.setCollisionMode(a, c);
}
}
aie(a, b) {
let c = null;
if (b == 35) {
c = this.df(35);
}
else {
c = this.df(35);
}
if (this.aky != null) {
c.ac0 = this.aky;
}
else {
c.ac0 = a.getMemberPathFor(0);
}
if (this.ajw != null) {
c.ad3 = this.ajw;
}
c.adt = this.ah0;
c.y4 = this.angleAxis;
c.za = this.valueAxis;
c.ha = true;
c.ack = true;
c.aa5 = this.aki;
c.yw = this.ahs;
c.aa2 = this.akb;
c.yv = this.ahr;
c.aav = this.aj2;
c.yt = this.ahq;
c.aaz = this.ajy;
c.yu = this.ahp;
c.zh = this.aid;
c.zi = this.aic;
c.aag = this.akg;
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.ak5));
this.angleAxis.k5 = 0;
this.valueAxis = new NumericRadiusAxis();
this.valueAxis.name = "valueAxis";
let b = this.valueAxis;
b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.ak6));
if (this.angleAxis.az == null) {
this.angleAxis.az = new AxisLabelSettings();
}
if (this.valueAxis.az == null) {
this.valueAxis.az = new AxisLabelSettings();
}
}
ak5(a, b) {
switch (b.propertyName) {
case "ActualMinimumValue":
this.wv("AngleAxisActualMinimum");
break;
case "ActualMaximumValue":
this.wv("AngleAxisActualMaximum");
break;
}
}
ak6(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);
}
}
afx(a) {
super.afx(a);
a.lf = this.ain;
a.lj = this.aio;
a.og = this.ai2;
if (!isNaN_(this.ai4)) {
a.oh = this.ai4;
}
else {
a.oh = 0.65;
}
}
afv(a) {
super.afv(a);
a.ol = this.aj7;
a.n0 = this.ah5;
a.oe = this.ai3;
if (!isNaN_(this.ai5)) {
a.ne = this.ai5;
}
if (this.ah7 != 0) {
if (this.ah7 == 1) {
a.ch = false;
}
else {
a.ch = true;
}
}
}
vi(a) {
super.vi(a);
a.ev = this.ail;
}
wd(a, b, c) {
super.wd(a, b, c);
switch (a) {
case "SliceLabelPositionMode":
this.u9((d) => {
if (d.eq) {
this.ce.setCollisionMode(d, this.ahw);
}
});
break;
case "SliceLabelContentSeparator":
this.ak1((d) => d.aag = this.akg);
break;
case "SliceLabelContentMode":
this.ak1((d) => d.zh = this.aid);
break;
case "LegendSliceLabelContentMode":
this.ak1((d) => d.zi = this.aic);
break;
case "SliceLabelFormat":
this.ak1((d) => d.aa5 = this.aki);
break;
case "SliceLabelFormatSpecifiers":
this.ak1((d) => d.yw = this.ahs);
break;
case "OthersSliceLabelFormat":
this.ak1((d) => d.aa2 = this.akb);
break;
case "OthersSliceLabelFormatSpecifiers":
this.ak1((d) => d.yv = this.ahr);
break;
case "LegendSliceLabelFormat":
this.ak1((d) => d.aav = this.aki);
break;
case "LegendSliceLabelFormatSpecifiers":
this.ak1((d) => d.yt = this.ahs);
break;
case "LegendOthersSliceLabelFormat":
this.ak1((d) => d.aaz = this.ajy);
break;
case "LegendOthersSliceLabelFormatSpecifiers":
this.ak1((d) => d.yu = this.ahp);
break;
case "SweepDirection":
if (this.angleAxis != null) {
if (this.ah7 != 0) {
if (this.ah7 == 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.ai5) ? 0 : this.ai5;
}
break;
case "RadiusExtent":
if (this.valueAxis != null) {
this.valueAxis.oh = isNaN_(this.ai4) ? 0.65 : this.ai4;
}
break;
case "OthersCategoryText":
if (this.angleAxis != null) {
this.angleAxis.ol = this.aj7;
}
break;
case "OthersCategoryType":
if (this.angleAxis != null) {
this.angleAxis.n0 = this.ah5;
}
break;
case "OthersCategoryThreshold":
if (this.angleAxis != null) {
this.angleAxis.oe = this.ai3;
}
break;
case "InnerExtent":
if (this.valueAxis != null) {
this.valueAxis.og = this.ai2;
}
break;
case "LightSliceLabelColor":
this.u6((d) => {
if (d.eq) {
this.ce.setCalloutLightColor(d, this.ala);
}
});
break;
case "DarkSliceLabelColor":
this.u6((d) => {
if (d.eq) {
this.ce.setCalloutDarkColor(d, this.ak9);
}
});
break;
case "ValueMemberPath":
if (c != null) {
this.vb((d) => {
if (typeCast(AnchoredRadialSeries.$, d) !== null) {
let e = d;
e.ac0 = this.aky;
}
});
this.angleAxis.or = this.aky;
}
else {
this.wk();
}
break;
case "LabelMemberPath":
if (c != null) {
let d = this.ajt;
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.ajw;
}
});
}
else {
this.wk();
}
break;
case "AngleAxisInterval":
this.angleAxis.nb = this.ai0;
break;
case "ValueAxisInterval":
this.valueAxis.l8 = this.ai8;
break;
case "ValueAxisFavorLabellingScaleEnd":
this.valueAxis.lj = this.aio;
break;
case "ValueAxisAutoRangeBufferMode":
this.valueAxis.ky = this.ahu;
break;
case "AngleAxisMinorInterval":
this.angleAxis.nc = this.ai1;
break;
case "ValueAxisMinorInterval":
this.valueAxis.md = this.ajb;
break;
case "ValueAxisIsLogarithmic":
this.valueAxis.lo = this.aip;
break;
case "ValueAxisLogarithmBase":
this.valueAxis.mm = this.ajd;
break;
case "ValueAxisMinimumValue":
this.valueAxis.mc = this.aja;
break;
case "ValueAxisMaximumValue":
this.valueAxis.mb = this.ai9;
break;
case "MarkerCollision":
this.vc((e, f) => this.ur(e, f));
break;
case "ValueAxisAbbreviateLargeNumbers":
this.af4((e) => e.lf = this.ain);
break;
case "FireMouseLeaveOnManipulationStart":
this.v1((e) => e.ev = this.ail);
break;
}
}
get aki() {
return this.ajl;
}
set aki(a) {
let b = this.aki;
if (a != b) {
this.ajl = a;
this.wd("SliceLabelFormat", b, this.aki);
}
}
get ahs() {
return this.aho;
}
set ahs(a) {
let b = this.ahs;
if (a != b) {
this.aho = a;
this.wd("SliceLabelFormatSpecifiers", b, this.ahs);
}
}
get aj2() {
return this.ajh;
}
set aj2(a) {
let b = this.aj2;
if (a != b) {
this.ajh = a;
this.wd("LegendSliceLabelFormat", b, this.aj2);
}
}
get ahq() {
return this.ahm;
}
set ahq(a) {
let b = this.ahq;
if (a != b) {
this.ahm = a;
this.wd("LegendSliceLabelFormatSpecifiers", b, this.ahq);
}
}
get akb() {
return this.ajj;
}
set akb(a) {
let b = this.akb;
if (a != b) {
this.ajj = a;
this.wd("OthersSliceLabelFormat", b, this.akb);
}
}
get ahr() {
return this.ahn;
}
set ahr(a) {
let b = this.ahr;
if (a != b) {
this.ahn = a;
this.wd("OthersSliceLabelFormatSpecifiers", b, this.ahr);
}
}
get ajy() {
return this.ajg;
}
set ajy(a) {
let b = this.ajy;
if (a != b) {
this.ajg = a;
this.wd("LegendOthersSliceLabelFormat", b, this.ajy);
}
}
get ahp() {
return this.ahl;
}
set ahp(a) {
let b = this.ahp;
if (a != b) {
this.ahl = a;
this.wd("LegendOthersSliceLabelFormatSpecifiers", b, this.ahp);
}
}
get ai2() {
return this.ais;
}
set ai2(a) {
let b = this.ai2;
if (a != b) {
this.ais = a;
this.wd("InnerExtent", b, this.ai2);
}
}
get ah7() {
return this.ah6;
}
set ah7(a) {
let b = this.ah7;
if (a != b) {
this.ah6 = a;
this.wd("SweepDirection", enumGetBox(PieChartSweepDirection_$type, b), enumGetBox(PieChartSweepDirection_$type, this.ah7));
}
}
get ahw() {
return this.ahv;
}
set ahw(a) {
let b = this.ahw;
if (a != b) {
this.ahv = a;
this.wd("SliceLabelPositionMode", enumGetBox(CalloutCollisionMode_$type, b), enumGetBox(CalloutCollisionMode_$type, this.ahw));
}
}
get ala() {
return this.ak8;
}
set ala(a) {
let b = this.ala;
if (a != b) {
this.ak8 = a;
this.wd("LightSliceLabelColor", b, this.ala);
}
}
get ak9() {
return this.ak7;
}
set ak9(a) {
let b = this.ak9;
if (a != b) {
this.ak7 = a;
this.wd("DarkSliceLabelColor", b, this.ak9);
}
}
get aky() {
return this.ajm;
}
set aky(a) {
let b = this.aky;
if (a != b) {
this.ajm = a;
this.wd("ValueMemberPath", b, this.aky);
}
}
get ajw() {
return this.ajf;
}
set ajw(a) {
let b = this.ajf;
if (a != b) {
this.ajf = a;
this.wd("LegendLabelMemberPath", b, this.ajf);
}
}
get ah0() {
return this.ahz;
}
set ah0(a) {
let b = this.ahz;
if (a != b) {
this.ahz = a;
this.wd("LegendEmptyValuesMode", enumGetBox(LegendEmptyValuesMode_$type, b), this.ajf);
}
}
get ah5() {
return this.ah4;
}
set ah5(a) {
let b = this.ah5;
if (a != b) {
this.ah4 = a;
this.wd("OthersCategoryType", enumGetBox(OthersCategoryType_$type, b), enumGetBox(OthersCategoryType_$type, this.ah5));
}
}
get ai3() {
return this.ait;
}
set ai3(a) {
let b = this.ai3;
if (a != b) {
this.ait = a;
this.wd("OthersCategoryThreshold", b, this.ai3);
}
}
get aj7() {
return this.aji;
}
set aj7(a) {
let b = this.aj7;
if (a != b) {
this.aji = a;
this.wd("OthersCategoryText", b, this.aj7);
}
}
ah3() {
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 ajt() {
return this.aje;
}
set ajt(a) {
let b = this.ajt;
if (a != b) {
this.aje = a;
this.wd("LabelMemberPath", b, this.ajt);
}
}
get aio() {
return this.aii;
}
set aio(a) {
let b = this.aio;
if (a != b) {
this.aii = a;
this.wd("ValueAxisFavorLabellingScaleEnd", b, this.aio);
}
}
get ahu() {
return this.aht;
}
set ahu(a) {
let b = this.ahu;
if (a != b) {
this.aht = a;
this.wd("ValueAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ahu));
}
}
get ai0() {
return this.aiq;
}
set ai0(a) {
let b = this.ai0;
if (a != b) {
this.aiq = a;
this.wd("AngleAxisInterval", b, this.ai0);
}
}
get ai1() {
return this.air;
}
set ai1(a) {
let b = this.ai1;
if (a != b) {
this.air = a;
this.wd("AngleAxisMinorInterval", b, this.ai1);
}
}
get ai8() {
return this.aiw;
}
set ai8(a) {
let b = this.ai8;
if (a != b) {
this.aiw = a;
this.wd("ValueAxisInterval", b, this.ai8);
}
}
get aip() {
return this.aij;
}
set aip(a) {
let b = this.aip;
if (a != b) {
this.aij = a;
this.wd("ValueAxisIsLogarithmic", b, this.aip);
}
}
get ajd() {
return this.ajc;
}
set ajd(a) {
let b = this.ajd;
if (a != b) {
this.ajc = a;
this.wd("ValueAxisLogarithmBase", b, this.ajd);
}
}
get aja() {
return this.aiy;
}
set aja(a) {
let b = this.aja;
if (a != b) {
this.aiy = a;
this.wd("ValueAxisMinimumValue", b, this.aja);
}
}
get ai9() {
return this.aix;
}
set ai9(a) {
let b = this.ai9;
if (a != b) {
this.aix = a;
this.wd("ValueAxisMaximumValue", b, this.ai9);
}
}
get ajb() {
return this.aiz;
}
set ajb(a) {
let b = this.ajb;
if (a != b) {
this.aiz = a;
this.wd("ValueAxisMinorInterval", b, this.ajb);
}
}
get ai7() {
return this.valueAxis.l4;
}
get ai6() {
return this.valueAxis.l3;
}
get ai4() {
return this.aiu;
}
set ai4(a) {
let b = this.ai4;
if (a != b) {
this.aiu = a;
this.wd("RadiusExtent", b, this.ai4);
}
}
get ai5() {
return this.aiv;
}
set ai5(a) {
let b = this.ai5;
if (a != b) {
this.aiv = a;
this.wd("StartAngle", b, this.ai5);
}
}
get akg() {
return this.ajk;
}
set akg(a) {
let b = this.akg;
if (a != b) {
this.ajk = a;
this.wd("SliceLabelContentSeparator", b, this.akg);
}
}
get aid() {
return this.aib;
}
set aid(a) {
let b = this.aid;
if (a != b) {
this.aib = a;
this.wd("SliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.aid));
}
}
get aic() {
return this.aia;
}
set aic(a) {
let b = this.aic;
if (a != b) {
this.aia = a;
this.wd("LegendSliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.aic));
}
}
get aik() {
return this.aif;
}
set aik(a) {
let b = this.aik;
if (a != b) {
this.aif = a;
this.wd("AngleAxisFavorLabellingScaleEnd", b, this.aik);
}
}
get ain() {
return this.aih;
}
set ain(a) {
let b = this.ain;
if (a != b) {
this.aih = a;
this.wd("ValueAxisAbbreviateLargeNumbers", b, this.ain);
}
}
get ahy() {
return this.ahx;
}
set ahy(a) {
let b = this.ahx;
if (a != b) {
this.ahx = a;
this.wd("MarkerCollision", enumGetBox(CollisionAvoidanceType_$type, b), enumGetBox(CollisionAvoidanceType_$type, this.ahx));
}
}
get ail() {
return this.aig;
}
set ail(a) {
let b = this.aig;
if (a != b) {
this.aig = a;
this.wd("FireMouseLeaveOnManipulationStart", b, this.aig);
}
}
}
DataPieBaseChart.$t = /*@__PURE__*/ markType(DataPieBaseChart, 'DataPieBaseChart', RadialBaseChart.$);
return DataPieBaseChart;
})();