UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

912 lines (911 loc) 28.6 kB
/* 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.aj3 = null; this.ah6 = null; this.ajz = null; this.ah4 = null; this.aj1 = null; this.ah5 = null; this.ajy = null; this.ah3 = null; this.aja = 0; this.aio = 0; this.aid = 6; this.alq = null; this.alp = null; this.aj4 = null; this.ajx = null; this.aih = 0; this.aim = 1; this.ajb = 3; this.aj0 = null; this.ajw = null; this.ai0 = true; this.aib = 0; this.ai8 = 0; this.ai9 = 0; this.aje = 0; this.ai1 = false; this.aju = 10; this.ajg = NaN; this.ajf = NaN; this.ajh = 0; this.ajc = NaN; this.ajd = NaN; this.aj2 = " - "; this.ait = 0; this.ais = 0; this.aix = true; this.aiz = true; this.aif = 0; this.aiy = false; } hk() { return true; } all(a) { this.alm((b, c) => a(b)); } alm(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); } } } alj(a) { this.alk((b, c) => a(b)); } alk(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); } } } xg() { let a = this.bf.dataSeries != null ? this.bf.dataSeries.count : 0; super.xg(); if (this.akb != null) { let b = this.akb; this.angleAxis.f2 = b; } else { this.angleAxis.f2 = this.adk == null ? RadialBaseChart.ae3(this.angleAxis, this.bf.dataSeries) : this.adk; } this.angleAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null; if (this.alg != null) { this.angleAxis.or = this.alg; } 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; } xe(a) { } hg(a) { if (!super.hg(a)) { return false; } return true; } xh() { this.valueAxis.lo = this.ai7; this.valueAxis.mm = this.ajv; } get angleAxis() { return this.aiq; } set angleAxis(a) { let b = this.angleAxis; if (a != b) { this.aiq = a; this.wj("AngleAxis", b, this.angleAxis); } } get valueAxis() { return this.aij; } set valueAxis(a) { let b = this.valueAxis; if (a != b) { this.aij = a; this.wj("ValueAxis", b, this.valueAxis); } } get_ai4() { return false; } get ai4() { return this.get_ai4(); } dc(a, b) { let c = null; if (b == 35) { c = this.aiw(a, b); } if (a.index > 0) { if (!this.ai4) { if (c != null) { c.o4(); } return null; } } return c; } vt(a, b) { super.vt(a, b); if (this.g4(a) && this.ce.isCalloutLayer(a)) { if (this.als != null) { this.ce.setCalloutLightColor(a, this.als); } if (this.alr != null) { this.ce.setCalloutDarkColor(a, this.alr); } let c = this.ah; if (this.aie != 0) { c = this.aie; } this.ce.setCollisionMode(a, c); } } aiw(a, b) { let c = null; if (b == 35) { c = this.df(35); } else { c = this.df(35); } if (this.alg != null) { c.ac0 = this.alg; } else { c.ac0 = a.getMemberPathFor(0); } if (this.ake != null) { c.ad3 = this.ake; } c.adt = this.aii; c.y4 = this.angleAxis; c.za = this.valueAxis; c.ha = true; c.ack = true; c.aa5 = this.ak0; c.yw = this.aia; c.aa2 = this.akt; c.yv = this.ah9; c.aav = this.akk; c.yt = this.ah8; c.aaz = this.akg; c.yu = this.ah7; c.zh = this.aiv; c.zi = this.aiu; c.aag = this.aky; return c; } aaw() { return this.angleAxis; } aax() { return this.valueAxis; } u3() { this.angleAxis = new ProportionalCategoryAngleAxis(); this.angleAxis.name = "angleAxis"; let a = this.angleAxis; a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.aln)); this.angleAxis.k5 = 0; this.valueAxis = new NumericRadiusAxis(); this.valueAxis.name = "valueAxis"; let b = this.valueAxis; b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.alo)); if (this.angleAxis.az == null) { this.angleAxis.az = new AxisLabelSettings(); } if (this.valueAxis.az == null) { this.valueAxis.az = new AxisLabelSettings(); } } aln(a, b) { switch (b.propertyName) { case "ActualMinimumValue": this.w1("AngleAxisActualMinimum"); break; case "ActualMaximumValue": this.w1("AngleAxisActualMaximum"); break; } } alo(a, b) { switch (b.propertyName) { case "ActualMinimumValue": this.w1("ValueAxisActualMinimum"); break; case "ActualMaximumValue": this.w1("ValueAxisActualMaximum"); break; } } ux(a, b) { let c = typeCast(RadialBase.$, a); if (c != null) { c.xf = this.c2(a, b); } } agf(a) { super.agf(a); a.lf = this.ai5; a.lj = this.ai6; a.og = this.ajk; if (!isNaN_(this.ajm)) { a.oh = this.ajm; } else { a.oh = 0.65; } } agd(a) { super.agd(a); if (!a.cl) { return; } a.ol = this.akp; a.n0 = this.ain; a.oe = this.ajl; if (!isNaN_(this.ajn)) { a.ne = this.ajn; } if (this.aip != 0) { if (this.aip == 1) { a.ch = false; } else { a.ch = true; } } } vo(a) { super.vo(a); a.ez = this.ai3; } wj(a, b, c) { super.wj(a, b, c); switch (a) { case "SliceLabelPositionMode": this.vf((d) => { if (d.eq) { this.ce.setCollisionMode(d, this.aie); } }); break; case "SliceLabelContentSeparator": this.alj((d) => d.aag = this.aky); break; case "SliceLabelContentMode": this.alj((d) => d.zh = this.aiv); break; case "LegendSliceLabelContentMode": this.alj((d) => d.zi = this.aiu); break; case "SliceLabelFormat": this.alj((d) => d.aa5 = this.ak0); break; case "SliceLabelFormatSpecifiers": this.alj((d) => d.yw = this.aia); break; case "OthersSliceLabelFormat": this.alj((d) => d.aa2 = this.akt); break; case "OthersSliceLabelFormatSpecifiers": this.alj((d) => d.yv = this.ah9); break; case "LegendSliceLabelFormat": this.alj((d) => d.aav = this.ak0); break; case "LegendSliceLabelFormatSpecifiers": this.alj((d) => d.yt = this.aia); break; case "LegendOthersSliceLabelFormat": this.alj((d) => d.aaz = this.akg); break; case "LegendOthersSliceLabelFormatSpecifiers": this.alj((d) => d.yu = this.ah7); break; case "SweepDirection": if (this.angleAxis != null) { if (this.aip != 0) { if (this.aip == 1) { this.angleAxis.ch = false; } else { this.angleAxis.ch = true; } } else { this.angleAxis.ch = this.aa8; } } break; case "StartAngle": if (this.angleAxis != null) { this.angleAxis.ne = isNaN_(this.ajn) ? 0 : this.ajn; } break; case "RadiusExtent": if (this.valueAxis != null) { this.valueAxis.oh = isNaN_(this.ajm) ? 0.65 : this.ajm; } break; case "OthersCategoryText": if (this.angleAxis != null) { this.angleAxis.ol = this.akp; } break; case "OthersCategoryType": if (this.angleAxis != null) { this.angleAxis.n0 = this.ain; } break; case "OthersCategoryThreshold": if (this.angleAxis != null) { this.angleAxis.oe = this.ajl; } break; case "InnerExtent": if (this.valueAxis != null) { this.valueAxis.og = this.ajk; } break; case "LightSliceLabelColor": this.vc((d) => { if (d.eq) { this.ce.setCalloutLightColor(d, this.als); } }); break; case "DarkSliceLabelColor": this.vc((d) => { if (d.eq) { this.ce.setCalloutDarkColor(d, this.alr); } }); break; case "ValueMemberPath": if (c != null) { this.vh((d) => { if (typeCast(AnchoredRadialSeries.$, d) !== null) { let e = d; e.ac0 = this.alg; } }); this.angleAxis.or = this.alg; } else { this.wq(); } break; case "LabelMemberPath": if (c != null) { let d = this.akb; this.angleAxis.f2 = d; } else { this.wq(); } break; case "LegendLabelMemberPath": if (c != null) { this.vh((e) => { if (typeCast(RadialPieSeries.$, e) !== null) { let f = e; f.ad3 = this.ake; } }); } else { this.wq(); } break; case "AngleAxisInterval": this.angleAxis.nb = this.aji; break; case "ValueAxisInterval": this.valueAxis.l8 = this.ajq; break; case "ValueAxisFavorLabellingScaleEnd": this.valueAxis.lj = this.ai6; break; case "ValueAxisAutoRangeBufferMode": this.valueAxis.ky = this.aic; break; case "AngleAxisMinorInterval": this.angleAxis.nc = this.ajj; break; case "ValueAxisMinorInterval": this.valueAxis.md = this.ajt; break; case "ValueAxisIsLogarithmic": this.valueAxis.lo = this.ai7; break; case "ValueAxisLogarithmBase": this.valueAxis.mm = this.ajv; break; case "ValueAxisMinimumValue": this.valueAxis.mc = this.ajs; break; case "ValueAxisMaximumValue": this.valueAxis.mb = this.ajr; break; case "MarkerCollision": this.vi((e, f) => this.ux(e, f)); break; case "ValueAxisAbbreviateLargeNumbers": this.agm((e) => e.lf = this.ai5); break; case "FireMouseLeaveOnManipulationStart": this.v7((e) => e.ez = this.ai3); break; } } get ak0() { return this.aj3; } set ak0(a) { let b = this.ak0; if (a != b) { this.aj3 = a; this.wj("SliceLabelFormat", b, this.ak0); } } get aia() { return this.ah6; } set aia(a) { let b = this.aia; if (a != b) { this.ah6 = a; this.wj("SliceLabelFormatSpecifiers", b, this.aia); } } get akk() { return this.ajz; } set akk(a) { let b = this.akk; if (a != b) { this.ajz = a; this.wj("LegendSliceLabelFormat", b, this.akk); } } get ah8() { return this.ah4; } set ah8(a) { let b = this.ah8; if (a != b) { this.ah4 = a; this.wj("LegendSliceLabelFormatSpecifiers", b, this.ah8); } } get akt() { return this.aj1; } set akt(a) { let b = this.akt; if (a != b) { this.aj1 = a; this.wj("OthersSliceLabelFormat", b, this.akt); } } get ah9() { return this.ah5; } set ah9(a) { let b = this.ah9; if (a != b) { this.ah5 = a; this.wj("OthersSliceLabelFormatSpecifiers", b, this.ah9); } } get akg() { return this.ajy; } set akg(a) { let b = this.akg; if (a != b) { this.ajy = a; this.wj("LegendOthersSliceLabelFormat", b, this.akg); } } get ah7() { return this.ah3; } set ah7(a) { let b = this.ah7; if (a != b) { this.ah3 = a; this.wj("LegendOthersSliceLabelFormatSpecifiers", b, this.ah7); } } get ajk() { return this.aja; } set ajk(a) { let b = this.ajk; if (a != b) { this.aja = a; this.wj("InnerExtent", b, this.ajk); } } get aip() { return this.aio; } set aip(a) { let b = this.aip; if (a != b) { this.aio = a; this.wj("SweepDirection", enumGetBox(PieChartSweepDirection_$type, b), enumGetBox(PieChartSweepDirection_$type, this.aip)); } } get aie() { return this.aid; } set aie(a) { let b = this.aie; if (a != b) { this.aid = a; this.wj("SliceLabelPositionMode", enumGetBox(CalloutCollisionMode_$type, b), enumGetBox(CalloutCollisionMode_$type, this.aie)); } } get als() { return this.alq; } set als(a) { let b = this.als; if (a != b) { this.alq = a; this.wj("LightSliceLabelColor", b, this.als); } } get alr() { return this.alp; } set alr(a) { let b = this.alr; if (a != b) { this.alp = a; this.wj("DarkSliceLabelColor", b, this.alr); } } get alg() { return this.aj4; } set alg(a) { let b = this.alg; if (a != b) { this.aj4 = a; this.wj("ValueMemberPath", b, this.alg); } } get ake() { return this.ajx; } set ake(a) { let b = this.ajx; if (a != b) { this.ajx = a; this.wj("LegendLabelMemberPath", b, this.ajx); } } get aii() { return this.aih; } set aii(a) { let b = this.aih; if (a != b) { this.aih = a; this.wj("LegendEmptyValuesMode", enumGetBox(LegendEmptyValuesMode_$type, b), this.ajx); } } get ain() { return this.aim; } set ain(a) { let b = this.ain; if (a != b) { this.aim = a; this.wj("OthersCategoryType", enumGetBox(OthersCategoryType_$type, b), enumGetBox(OthersCategoryType_$type, this.ain)); } } get ajl() { return this.ajb; } set ajl(a) { let b = this.ajl; if (a != b) { this.ajb = a; this.wj("OthersCategoryThreshold", b, this.ajl); } } get akp() { return this.aj0; } set akp(a) { let b = this.akp; if (a != b) { this.aj0 = a; this.wj("OthersCategoryText", b, this.akp); } } ail() { 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 akb() { return this.ajw; } set akb(a) { let b = this.akb; if (a != b) { this.ajw = a; this.wj("LabelMemberPath", b, this.akb); } } get ai6() { return this.ai0; } set ai6(a) { let b = this.ai6; if (a != b) { this.ai0 = a; this.wj("ValueAxisFavorLabellingScaleEnd", b, this.ai6); } } get aic() { return this.aib; } set aic(a) { let b = this.aic; if (a != b) { this.aib = a; this.wj("ValueAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.aic)); } } get aji() { return this.ai8; } set aji(a) { let b = this.aji; if (a != b) { this.ai8 = a; this.wj("AngleAxisInterval", b, this.aji); } } get ajj() { return this.ai9; } set ajj(a) { let b = this.ajj; if (a != b) { this.ai9 = a; this.wj("AngleAxisMinorInterval", b, this.ajj); } } get ajq() { return this.aje; } set ajq(a) { let b = this.ajq; if (a != b) { this.aje = a; this.wj("ValueAxisInterval", b, this.ajq); } } get ai7() { return this.ai1; } set ai7(a) { let b = this.ai7; if (a != b) { this.ai1 = a; this.wj("ValueAxisIsLogarithmic", b, this.ai7); } } get ajv() { return this.aju; } set ajv(a) { let b = this.ajv; if (a != b) { this.aju = a; this.wj("ValueAxisLogarithmBase", b, this.ajv); } } get ajs() { return this.ajg; } set ajs(a) { let b = this.ajs; if (a != b) { this.ajg = a; this.wj("ValueAxisMinimumValue", b, this.ajs); } } get ajr() { return this.ajf; } set ajr(a) { let b = this.ajr; if (a != b) { this.ajf = a; this.wj("ValueAxisMaximumValue", b, this.ajr); } } get ajt() { return this.ajh; } set ajt(a) { let b = this.ajt; if (a != b) { this.ajh = a; this.wj("ValueAxisMinorInterval", b, this.ajt); } } get ajp() { return this.valueAxis.l4; } get ajo() { return this.valueAxis.l3; } get ajm() { return this.ajc; } set ajm(a) { let b = this.ajm; if (a != b) { this.ajc = a; this.wj("RadiusExtent", b, this.ajm); } } get ajn() { return this.ajd; } set ajn(a) { let b = this.ajn; if (a != b) { this.ajd = a; this.wj("StartAngle", b, this.ajn); } } get aky() { return this.aj2; } set aky(a) { let b = this.aky; if (a != b) { this.aj2 = a; this.wj("SliceLabelContentSeparator", b, this.aky); } } get aiv() { return this.ait; } set aiv(a) { let b = this.aiv; if (a != b) { this.ait = a; this.wj("SliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.aiv)); } } get aiu() { return this.ais; } set aiu(a) { let b = this.aiu; if (a != b) { this.ais = a; this.wj("LegendSliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.aiu)); } } get ai2() { return this.aix; } set ai2(a) { let b = this.ai2; if (a != b) { this.aix = a; this.wj("AngleAxisFavorLabellingScaleEnd", b, this.ai2); } } get ai5() { return this.aiz; } set ai5(a) { let b = this.ai5; if (a != b) { this.aiz = a; this.wj("ValueAxisAbbreviateLargeNumbers", b, this.ai5); } } get aig() { return this.aif; } set aig(a) { let b = this.aif; if (a != b) { this.aif = a; this.wj("MarkerCollision", enumGetBox(CollisionAvoidanceType_$type, b), enumGetBox(CollisionAvoidanceType_$type, this.aif)); } } get ai3() { return this.aiy; } set ai3(a) { let b = this.aiy; if (a != b) { this.aiy = a; this.wj("FireMouseLeaveOnManipulationStart", b, this.aiy); } } } DataPieBaseChart.$t = /*@__PURE__*/ markType(DataPieBaseChart, 'DataPieBaseChart', RadialBaseChart.$); return DataPieBaseChart; })();