UNPKG

igniteui-react-charts

Version:

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

1,002 lines (1,001 loc) 31.1 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.ak0 = null; this.aiv = null; this.akw = null; this.ait = null; this.aky = null; this.aiu = null; this.akv = null; this.ais = null; this.aj1 = 0; this.ajd = 0; this.ai2 = 6; this.amt = null; this.ams = null; this.ak1 = null; this.aku = null; this.ai6 = 0; this.ajb = 1; this.aj2 = 3; this.akx = null; this.amu = null; this.amv = null; this.akt = null; this.ajq = true; this.ai0 = 0; this.ajz = 0; this.aj0 = 0; this.aj8 = 0; this.ajr = false; this.akr = 10; this.aka = NaN; this.aj9 = NaN; this.akb = 0; this.aj3 = NaN; this.aj7 = NaN; this.akz = " - "; this.aji = 0; this.ajh = 0; this.aj4 = 2; this.aj5 = 2; this.aj6 = NaN; this.ajo = false; this.ajm = true; this.ajp = true; this.ai4 = 0; this.ajn = false; } hr() { return true; } amo(a) { this.amp((b, c) => a(b)); } amp(a) { if (this.dataChart == null) { return; } for (let b = 0; b < this.dataChart.b9.count; b++) { let c = this.dataChart.b9._inner[b]; if (c.fx) { a(c, b); } } } amm(a) { this.amn((b, c) => a(b)); } amn(a) { if (this.dataChart == null) { return; } for (let b = 0; b < this.dataChart.b9.count; b++) { let c = this.dataChart.b9._inner[b]; if (c.fx) { a(c, b); } } } x1() { let a = this.bg.dataSeries != null ? this.bg.dataSeries.count : 0; super.x1(); if (this.ak8 != null) { let b = this.ak8; this.angleAxis.hz = b; } else { this.angleAxis.hz = this.ad9 == null ? RadialBaseChart.afs(this.angleAxis, this.bg.dataSeries) : this.ad9; } this.angleAxis.itemsSource = this.dataChart != null && this.dataChart.b9.count > 0 ? this.dataChart.b9._inner[0].itemsSource : null; if (this.amj != null) { this.angleAxis.tw = this.amj; } else { this.angleAxis.tw = (this.dataChart != null && this.dataChart.b9.count > 0 && typeCast(RadialPieSeries.$, this.dataChart.b9._inner[0]) !== null) ? this.dataChart.b9._inner[0].ado : null; } } c4(a, b) { if (this.c7 == null || this.c7.count == 0) { return 13; } let c = super.c4(a, b); if (c == 1) { return 13; } return c; } xz(a) { } hn(a) { if (!super.hn(a)) { return false; } return true; } x2() { this.valueAxis.qi = this.ajy; this.valueAxis.rl = this.aks; } get angleAxis() { return this.ajf; } set angleAxis(a) { let b = this.angleAxis; if (a != b) { this.ajf = a; this.w1("AngleAxis", b, this.angleAxis); } } get valueAxis() { return this.ai8; } set valueAxis(a) { let b = this.valueAxis; if (a != b) { this.ai8 = a; this.w1("ValueAxis", b, this.valueAxis); } } get_aju() { return false; } get aju() { return this.get_aju(); } de(a, b) { let c = null; if (b == 35) { c = this.ajl(a, b); } if (a.index > 0) { if (!this.aju) { if (c != null) { c.pg(); } return null; } } return c; } wa(a, b) { super.wa(a, b); if (this.ha(a) && this.cg.isCalloutLayer(a)) { if (this.amx != null) { this.cg.setCalloutLightColor(a, this.amx); } if (this.amw != null) { this.cg.setCalloutDarkColor(a, this.amw); } let c = this.ah; if (this.ai3 != 0) { c = this.ai3; } this.cg.setCollisionMode(a, c); } } ajl(a, b) { let c = null; if (b == 35) { c = this.dh(35); } else { c = this.dh(35); } if (this.amj != null) { c.ado = this.amj; } else { c.ado = a.getMemberPathFor(0); } if (this.alb != null) { c.aet = this.alb; } c.aeh = this.ai7; c.zl = this.angleAxis; c.zr = this.valueAxis; c.hg = true; c.ac8 = true; c.abp = this.al2; c.zd = this.aiz; c.abm = this.als; c.zc = this.aiy; c.abd = this.alh; c.za = this.aix; c.abj = this.ald; c.zb = this.aiw; c.acp = this.amy; c.acq = this.amz; c.zy = this.ajk; c.zz = this.ajj; c.aay = this.al0; c.aeo = this.akh; c.aep = this.aki; c.jv = this.akj; c.aen = this.ajv; return c; } abl() { return this.angleAxis; } abm() { return this.valueAxis; } vi() { this.angleAxis = new ProportionalCategoryAngleAxis(); this.angleAxis.name = "angleAxis"; let a = this.angleAxis; a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.amq)); this.angleAxis.py = 0; this.valueAxis = new NumericRadiusAxis(); this.valueAxis.name = "valueAxis"; let b = this.valueAxis; b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.amr)); if (this.angleAxis.a4 == null) { this.angleAxis.a4 = new AxisLabelSettings(); } if (this.valueAxis.a4 == null) { this.valueAxis.a4 = new AxisLabelSettings(); } } amq(a, b) { switch (b.propertyName) { case "ActualMinimumValue": this.xk("AngleAxisActualMinimum"); break; case "ActualMaximumValue": this.xk("AngleAxisActualMaximum"); break; } } amr(a, b) { switch (b.propertyName) { case "ActualMinimumValue": this.xk("ValueAxisActualMinimum"); break; case "ActualMaximumValue": this.xk("ValueAxisActualMaximum"); break; } } vb(a, b) { let c = typeCast(RadialBase.$, a); if (c != null) { c.xw = this.c4(a, b); } } ag4(a) { super.ag4(a); a.p9 = this.ajw; a.qd = this.ajx; a.tr = this.ake; if (!isNaN_(this.akg)) { a.ts = this.akg; } else { a.ts = 0.65; } } ag2(a) { super.ag2(a); if (!a.ds) { return; } a.tq = this.alo; a.s5 = this.ajc; a.tj = this.akf; if (!isNaN_(this.akk)) { a.sb = this.akk; } if (this.aje != 0) { if (this.aje == 1) { a.dn = false; } else { a.dn = true; } } } v5(a) { super.v5(a); a.fk = this.ajt; } w1(a, b, c) { super.w1(a, b, c); switch (a) { case "SliceLabelPositionMode": this.vw((d) => { if (d.eq) { this.cg.setCollisionMode(d, this.ai3); } }); break; case "SliceLabelContentSeparator": this.amm((d) => d.aay = this.al0); break; case "SliceLabelContentMode": this.amm((d) => d.zy = this.ajk); break; case "LegendSliceLabelContentMode": this.amm((d) => d.zz = this.ajj); break; case "SliceLabelFormat": this.amm((d) => d.abp = this.al2); break; case "SliceLabelFormatSpecifiers": this.amm((d) => d.zd = this.aiz); break; case "OthersSliceLabelFormat": this.amm((d) => d.abm = this.als); break; case "OthersSliceLabelFormatSpecifiers": this.amm((d) => d.zc = this.aiy); break; case "LegendSliceLabelFormat": this.amm((d) => d.abd = this.al2); break; case "LegendSliceLabelFormatSpecifiers": this.amm((d) => d.za = this.aiz); break; case "LegendOthersSliceLabelFormat": this.amm((d) => d.abj = this.ald); break; case "LegendOthersSliceLabelFormatSpecifiers": this.amm((d) => d.zb = this.aiw); break; case "RadiusX": this.amm((d) => d.aeo = this.akh); break; case "RadiusY": this.amm((d) => d.aep = this.aki); break; case "SelectionThickness": this.amm((d) => d.jv = this.akj); break; case "UseInsetOutlines": this.amm((d) => d.aen = this.ajv); break; case "SweepDirection": if (this.angleAxis != null) { if (this.aje != 0) { if (this.aje == 1) { this.angleAxis.dn = false; } else { this.angleAxis.dn = true; } } else { this.angleAxis.dn = this.abx; } } break; case "StartAngle": if (this.angleAxis != null) { this.angleAxis.sb = isNaN_(this.akk) ? 0 : this.akk; } break; case "RadiusExtent": if (this.valueAxis != null) { this.valueAxis.ts = isNaN_(this.akg) ? 0.65 : this.akg; } break; case "OthersCategoryText": if (this.angleAxis != null) { this.angleAxis.tq = this.alo; } break; case "OthersCategoryType": if (this.angleAxis != null) { this.angleAxis.s5 = this.ajc; } break; case "OthersCategoryThreshold": if (this.angleAxis != null) { this.angleAxis.tj = this.akf; } break; case "OthersCategoryBrush": this.amm((d) => d.acp = this.amy); break; case "OthersCategoryOutline": this.amm((d) => d.acq = this.amz); break; case "InnerExtent": if (this.valueAxis != null) { this.valueAxis.tr = this.ake; } break; case "LightSliceLabelColor": this.vt((d) => { if (d.eq) { this.cg.setCalloutLightColor(d, this.amx); } }); break; case "DarkSliceLabelColor": this.vt((d) => { if (d.eq) { this.cg.setCalloutDarkColor(d, this.amw); } }); break; case "ValueMemberPath": if (c != null) { this.vy((d) => { if (typeCast(AnchoredRadialSeries.$, d) !== null) { let e = d; e.ado = this.amj; } }); this.angleAxis.tw = this.amj; } else { this.w8(); } break; case "LabelMemberPath": if (c != null) { let d = this.ak8; this.angleAxis.hz = d; } else { this.w8(); } break; case "LegendLabelMemberPath": if (c != null) { this.vy((e) => { if (typeCast(RadialPieSeries.$, e) !== null) { let f = e; f.aet = this.alb; } }); } else { this.w8(); } break; case "AngleAxisInterval": this.angleAxis.r8 = this.akc; break; case "ValueAxisInterval": this.valueAxis.q7 = this.akn; break; case "ValueAxisFavorLabellingScaleEnd": this.valueAxis.qd = this.ajx; break; case "ValueAxisAutoRangeBufferMode": this.valueAxis.pr = this.ai1; break; case "AngleAxisMinorInterval": this.angleAxis.r9 = this.akd; break; case "ValueAxisMinorInterval": this.valueAxis.rc = this.akq; break; case "ValueAxisIsLogarithmic": this.valueAxis.qi = this.ajy; break; case "ValueAxisLogarithmBase": this.valueAxis.rl = this.aks; break; case "ValueAxisMinimumValue": this.valueAxis.rb = this.akp; break; case "ValueAxisMaximumValue": this.valueAxis.ra = this.ako; break; case "MarkerCollision": this.vz((e, f) => this.vb(e, f)); break; case "ValueAxisAbbreviateLargeNumbers": this.ahb((e) => e.p9 = this.ajw); break; case "FireMouseLeaveOnManipulationStart": this.wp((e) => e.fk = this.ajt); break; } } get al2() { return this.ak0; } set al2(a) { let b = this.al2; if (a != b) { this.ak0 = a; this.w1("SliceLabelFormat", b, this.al2); } } get aiz() { return this.aiv; } set aiz(a) { let b = this.aiz; if (a != b) { this.aiv = a; this.w1("SliceLabelFormatSpecifiers", b, this.aiz); } } get alh() { return this.akw; } set alh(a) { let b = this.alh; if (a != b) { this.akw = a; this.w1("LegendSliceLabelFormat", b, this.alh); } } get aix() { return this.ait; } set aix(a) { let b = this.aix; if (a != b) { this.ait = a; this.w1("LegendSliceLabelFormatSpecifiers", b, this.aix); } } get als() { return this.aky; } set als(a) { let b = this.als; if (a != b) { this.aky = a; this.w1("OthersSliceLabelFormat", b, this.als); } } get aiy() { return this.aiu; } set aiy(a) { let b = this.aiy; if (a != b) { this.aiu = a; this.w1("OthersSliceLabelFormatSpecifiers", b, this.aiy); } } get ald() { return this.akv; } set ald(a) { let b = this.ald; if (a != b) { this.akv = a; this.w1("LegendOthersSliceLabelFormat", b, this.ald); } } get aiw() { return this.ais; } set aiw(a) { let b = this.aiw; if (a != b) { this.ais = a; this.w1("LegendOthersSliceLabelFormatSpecifiers", b, this.aiw); } } get ake() { return this.aj1; } set ake(a) { let b = this.ake; if (a != b) { this.aj1 = a; this.w1("InnerExtent", b, this.ake); } } get aje() { return this.ajd; } set aje(a) { let b = this.aje; if (a != b) { this.ajd = a; this.w1("SweepDirection", enumGetBox(PieChartSweepDirection_$type, b), enumGetBox(PieChartSweepDirection_$type, this.aje)); } } get ai3() { return this.ai2; } set ai3(a) { let b = this.ai3; if (a != b) { this.ai2 = a; this.w1("SliceLabelPositionMode", enumGetBox(CalloutCollisionMode_$type, b), enumGetBox(CalloutCollisionMode_$type, this.ai3)); } } get amx() { return this.amt; } set amx(a) { let b = this.amx; if (a != b) { this.amt = a; this.w1("LightSliceLabelColor", b, this.amx); } } get amw() { return this.ams; } set amw(a) { let b = this.amw; if (a != b) { this.ams = a; this.w1("DarkSliceLabelColor", b, this.amw); } } get amj() { return this.ak1; } set amj(a) { let b = this.amj; if (a != b) { this.ak1 = a; this.w1("ValueMemberPath", b, this.amj); } } get alb() { return this.aku; } set alb(a) { let b = this.aku; if (a != b) { this.aku = a; this.w1("LegendLabelMemberPath", b, this.aku); } } get ai7() { return this.ai6; } set ai7(a) { let b = this.ai6; if (a != b) { this.ai6 = a; this.w1("LegendEmptyValuesMode", enumGetBox(LegendEmptyValuesMode_$type, b), this.aku); } } get ajc() { return this.ajb; } set ajc(a) { let b = this.ajc; if (a != b) { this.ajb = a; this.w1("OthersCategoryType", enumGetBox(OthersCategoryType_$type, b), enumGetBox(OthersCategoryType_$type, this.ajc)); } } get akf() { return this.aj2; } set akf(a) { let b = this.akf; if (a != b) { this.aj2 = a; this.w1("OthersCategoryThreshold", b, this.akf); } } get alo() { return this.akx; } set alo(a) { let b = this.alo; if (a != b) { this.akx = a; this.w1("OthersCategoryText", b, this.alo); } } get amy() { return this.amu; } set amy(a) { let b = this.amy; if (a != b) { this.amu = a; this.w1("OthersCategoryBrush", b, this.amy); } } get amz() { return this.amv; } set amz(a) { let b = this.amz; if (a != b) { this.amv = a; this.w1("OthersCategoryOutline", b, this.amz); } } aja() { let a = new OthersCategoryContext(); if (this.angleAxis != null && this.angleAxis.po != null) { let b = new List$1(Base.$, 0); for (let c = 0; c < this.angleAxis.po.count; c++) { if (this.angleAxis.isOthersValue(c)) { b.add1(this.angleAxis.po.item(c)); } } a.items = b.toArray(); } return a; } get ak8() { return this.akt; } set ak8(a) { let b = this.ak8; if (a != b) { this.akt = a; this.w1("LabelMemberPath", b, this.ak8); } } get ajx() { return this.ajq; } set ajx(a) { let b = this.ajx; if (a != b) { this.ajq = a; this.w1("ValueAxisFavorLabellingScaleEnd", b, this.ajx); } } get ai1() { return this.ai0; } set ai1(a) { let b = this.ai1; if (a != b) { this.ai0 = a; this.w1("ValueAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ai1)); } } get akc() { return this.ajz; } set akc(a) { let b = this.akc; if (a != b) { this.ajz = a; this.w1("AngleAxisInterval", b, this.akc); } } get akd() { return this.aj0; } set akd(a) { let b = this.akd; if (a != b) { this.aj0 = a; this.w1("AngleAxisMinorInterval", b, this.akd); } } get akn() { return this.aj8; } set akn(a) { let b = this.akn; if (a != b) { this.aj8 = a; this.w1("ValueAxisInterval", b, this.akn); } } get ajy() { return this.ajr; } set ajy(a) { let b = this.ajy; if (a != b) { this.ajr = a; this.w1("ValueAxisIsLogarithmic", b, this.ajy); } } get aks() { return this.akr; } set aks(a) { let b = this.aks; if (a != b) { this.akr = a; this.w1("ValueAxisLogarithmBase", b, this.aks); } } get akp() { return this.aka; } set akp(a) { let b = this.akp; if (a != b) { this.aka = a; this.w1("ValueAxisMinimumValue", b, this.akp); } } get ako() { return this.aj9; } set ako(a) { let b = this.ako; if (a != b) { this.aj9 = a; this.w1("ValueAxisMaximumValue", b, this.ako); } } get akq() { return this.akb; } set akq(a) { let b = this.akq; if (a != b) { this.akb = a; this.w1("ValueAxisMinorInterval", b, this.akq); } } get akm() { return this.valueAxis.qy; } get akl() { return this.valueAxis.qx; } get akg() { return this.aj3; } set akg(a) { let b = this.akg; if (a != b) { this.aj3 = a; this.w1("RadiusExtent", b, this.akg); } } get akk() { return this.aj7; } set akk(a) { let b = this.akk; if (a != b) { this.aj7 = a; this.w1("StartAngle", b, this.akk); } } get al0() { return this.akz; } set al0(a) { let b = this.al0; if (a != b) { this.akz = a; this.w1("SliceLabelContentSeparator", b, this.al0); } } get ajk() { return this.aji; } set ajk(a) { let b = this.ajk; if (a != b) { this.aji = a; this.w1("SliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.ajk)); } } get ajj() { return this.ajh; } set ajj(a) { let b = this.ajj; if (a != b) { this.ajh = a; this.w1("LegendSliceLabelContentMode", enumGetBox(RadialLabelMode_$type, b), enumGetBox(RadialLabelMode_$type, this.ajj)); } } get akh() { return this.aj4; } set akh(a) { let b = this.aj4; if (a != b) { this.aj4 = a; this.w1("RadiusX", b, this.aj4); } } get aki() { return this.aj5; } set aki(a) { let b = this.aj5; if (a != b) { this.aj5 = a; this.w1("RadiusY", b, this.aj5); } } get akj() { return this.aj6; } set akj(a) { let b = this.aj6; if (a != b) { this.aj6 = a; this.w1("SelectionThickness", b, this.aj6); } } get ajv() { return this.ajo; } set ajv(a) { let b = this.ajo; if (a != b) { this.ajo = a; this.w1("UseInsetOutlines", b, this.ajo); } } get ajs() { return this.ajm; } set ajs(a) { let b = this.ajs; if (a != b) { this.ajm = a; this.w1("AngleAxisFavorLabellingScaleEnd", b, this.ajs); } } get ajw() { return this.ajp; } set ajw(a) { let b = this.ajw; if (a != b) { this.ajp = a; this.w1("ValueAxisAbbreviateLargeNumbers", b, this.ajw); } } get ai5() { return this.ai4; } set ai5(a) { let b = this.ai4; if (a != b) { this.ai4 = a; this.w1("MarkerCollision", enumGetBox(CollisionAvoidanceType_$type, b), enumGetBox(CollisionAvoidanceType_$type, this.ai4)); } } get ajt() { return this.ajn; } set ajt(a) { let b = this.ajn; if (a != b) { this.ajn = a; this.w1("FireMouseLeaveOnManipulationStart", b, this.ajn); } } } DataPieBaseChart.$t = /*@__PURE__*/ markType(DataPieBaseChart, 'DataPieBaseChart', RadialBaseChart.$); return DataPieBaseChart; })();