UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

972 lines (971 loc) 31.2 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-angular-core"; import { PieChartSweepDirection_$type } from "./PieChartSweepDirection"; import { CalloutCollisionMode_$type } from "igniteui-angular-core"; import { LegendEmptyValuesMode_$type } from "igniteui-angular-core"; import { OthersCategoryType_$type } from "igniteui-angular-core"; import { AxisRangeBufferMode_$type } from "./AxisRangeBufferMode"; import { RadialLabelMode_$type } from "igniteui-angular-core"; import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType"; import { RadialBase } from "./RadialBase"; import { List$1 } from "igniteui-angular-core"; import { RadialPieSeries } from "./RadialPieSeries"; import { AnchoredRadialSeries } from "./AnchoredRadialSeries"; import { AxisLabelSettings } from "./AxisLabelSettings"; import { OthersCategoryContext } from "./OthersCategoryContext"; import { isNaN_ } from "igniteui-angular-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.amr = null; this.amq = null; this.ak1 = null; this.aku = null; this.ai6 = 0; this.ajb = 1; this.aj2 = 3; this.akx = 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; } 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.fw) { a(c, b); } } } amk(a) { this.aml((b, c) => a(b)); } aml(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.fw) { 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.hw = b; } else { this.angleAxis.hw = 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.amh != null) { this.angleAxis.tr = this.amh; } else { this.angleAxis.tr = (this.dataChart != null && this.dataChart.b9.count > 0 && typeCast(RadialPieSeries.$, this.dataChart.b9._inner[0]) !== null) ? this.dataChart.b9._inner[0].adg : 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.qd = this.ajy; this.valueAxis.rg = 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.pe(); } return null; } } return c; } wa(a, b) { super.wa(a, b); if (this.ha(a) && this.cg.isCalloutLayer(a)) { if (this.amt != null) { this.cg.setCalloutLightColor(a, this.amt); } if (this.ams != null) { this.cg.setCalloutDarkColor(a, this.ams); } 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.amh != null) { c.adg = this.amh; } else { c.adg = a.getMemberPathFor(0); } if (this.alb != null) { c.ael = this.alb; } c.ad9 = this.ai7; c.zj = this.angleAxis; c.zp = this.valueAxis; c.hf = true; c.ac0 = true; c.abl = this.al0; c.zb = this.aiz; c.abi = this.alq; c.za = this.aiy; c.abb = this.alh; c.y8 = this.aix; c.abf = this.ald; c.y9 = this.aiw; c.zw = this.ajk; c.zx = this.ajj; c.aaw = this.aly; c.aeg = this.akh; c.aeh = this.aki; c.ju = this.akj; c.aef = 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.amo)); this.angleAxis.pt = 0; this.valueAxis = new NumericRadiusAxis(); this.valueAxis.name = "valueAxis"; let b = this.valueAxis; b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.amp)); if (this.angleAxis.a4 == null) { this.angleAxis.a4 = new AxisLabelSettings(); } if (this.valueAxis.a4 == null) { this.valueAxis.a4 = new AxisLabelSettings(); } } amo(a, b) { switch (b.propertyName) { case "ActualMinimumValue": this.xk("AngleAxisActualMinimum"); break; case "ActualMaximumValue": this.xk("AngleAxisActualMaximum"); break; } } amp(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.xu = this.c4(a, b); } } ag4(a) { super.ag4(a); a.p3 = this.ajw; a.p8 = this.ajx; a.tm = this.ake; if (!isNaN_(this.akg)) { a.tn = this.akg; } else { a.tn = 0.65; } } ag2(a) { super.ag2(a); if (!a.ds) { return; } a.tl = this.alm; a.s0 = this.ajc; a.te = this.akf; if (!isNaN_(this.akk)) { a.r6 = 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.amk((d) => d.aaw = this.aly); break; case "SliceLabelContentMode": this.amk((d) => d.zw = this.ajk); break; case "LegendSliceLabelContentMode": this.amk((d) => d.zx = this.ajj); break; case "SliceLabelFormat": this.amk((d) => d.abl = this.al0); break; case "SliceLabelFormatSpecifiers": this.amk((d) => d.zb = this.aiz); break; case "OthersSliceLabelFormat": this.amk((d) => d.abi = this.alq); break; case "OthersSliceLabelFormatSpecifiers": this.amk((d) => d.za = this.aiy); break; case "LegendSliceLabelFormat": this.amk((d) => d.abb = this.al0); break; case "LegendSliceLabelFormatSpecifiers": this.amk((d) => d.y8 = this.aiz); break; case "LegendOthersSliceLabelFormat": this.amk((d) => d.abf = this.ald); break; case "LegendOthersSliceLabelFormatSpecifiers": this.amk((d) => d.y9 = this.aiw); break; case "RadiusX": this.amk((d) => d.aeg = this.akh); break; case "RadiusY": this.amk((d) => d.aeh = this.aki); break; case "SelectionThickness": this.amk((d) => d.ju = this.akj); break; case "UseInsetOutlines": this.amk((d) => d.aef = 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.r6 = isNaN_(this.akk) ? 0 : this.akk; } break; case "RadiusExtent": if (this.valueAxis != null) { this.valueAxis.tn = isNaN_(this.akg) ? 0.65 : this.akg; } break; case "OthersCategoryText": if (this.angleAxis != null) { this.angleAxis.tl = this.alm; } break; case "OthersCategoryType": if (this.angleAxis != null) { this.angleAxis.s0 = this.ajc; } break; case "OthersCategoryThreshold": if (this.angleAxis != null) { this.angleAxis.te = this.akf; } break; case "InnerExtent": if (this.valueAxis != null) { this.valueAxis.tm = this.ake; } break; case "LightSliceLabelColor": this.vt((d) => { if (d.eq) { this.cg.setCalloutLightColor(d, this.amt); } }); break; case "DarkSliceLabelColor": this.vt((d) => { if (d.eq) { this.cg.setCalloutDarkColor(d, this.ams); } }); break; case "ValueMemberPath": if (c != null) { this.vy((d) => { if (typeCast(AnchoredRadialSeries.$, d) !== null) { let e = d; e.adg = this.amh; } }); this.angleAxis.tr = this.amh; } else { this.w8(); } break; case "LabelMemberPath": if (c != null) { let d = this.ak8; this.angleAxis.hw = d; } else { this.w8(); } break; case "LegendLabelMemberPath": if (c != null) { this.vy((e) => { if (typeCast(RadialPieSeries.$, e) !== null) { let f = e; f.ael = this.alb; } }); } else { this.w8(); } break; case "AngleAxisInterval": this.angleAxis.r3 = this.akc; break; case "ValueAxisInterval": this.valueAxis.q1 = this.akn; break; case "ValueAxisFavorLabellingScaleEnd": this.valueAxis.p8 = this.ajx; break; case "ValueAxisAutoRangeBufferMode": this.valueAxis.pm = this.ai1; break; case "AngleAxisMinorInterval": this.angleAxis.r4 = this.akd; break; case "ValueAxisMinorInterval": this.valueAxis.q6 = this.akq; break; case "ValueAxisIsLogarithmic": this.valueAxis.qd = this.ajy; break; case "ValueAxisLogarithmBase": this.valueAxis.rg = this.aks; break; case "ValueAxisMinimumValue": this.valueAxis.q5 = this.akp; break; case "ValueAxisMaximumValue": this.valueAxis.q4 = this.ako; break; case "MarkerCollision": this.vz((e, f) => this.vb(e, f)); break; case "ValueAxisAbbreviateLargeNumbers": this.ahb((e) => e.p3 = this.ajw); break; case "FireMouseLeaveOnManipulationStart": this.wp((e) => e.fk = this.ajt); break; } } get al0() { return this.ak0; } set al0(a) { let b = this.al0; if (a != b) { this.ak0 = a; this.w1("SliceLabelFormat", b, this.al0); } } 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 alq() { return this.aky; } set alq(a) { let b = this.alq; if (a != b) { this.aky = a; this.w1("OthersSliceLabelFormat", b, this.alq); } } 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 amt() { return this.amr; } set amt(a) { let b = this.amt; if (a != b) { this.amr = a; this.w1("LightSliceLabelColor", b, this.amt); } } get ams() { return this.amq; } set ams(a) { let b = this.ams; if (a != b) { this.amq = a; this.w1("DarkSliceLabelColor", b, this.ams); } } get amh() { return this.ak1; } set amh(a) { let b = this.amh; if (a != b) { this.ak1 = a; this.w1("ValueMemberPath", b, this.amh); } } 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 alm() { return this.akx; } set alm(a) { let b = this.alm; if (a != b) { this.akx = a; this.w1("OthersCategoryText", b, this.alm); } } aja() { let a = new OthersCategoryContext(); if (this.angleAxis != null && this.angleAxis.pj != null) { let b = new List$1(Base.$, 0); for (let c = 0; c < this.angleAxis.pj.count; c++) { if (this.angleAxis.isOthersValue(c)) { b.add1(this.angleAxis.pj.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.qt; } get akl() { return this.valueAxis.qs; } 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 aly() { return this.akz; } set aly(a) { let b = this.aly; if (a != b) { this.akz = a; this.w1("SliceLabelContentSeparator", b, this.aly); } } 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 = markType(DataPieBaseChart, 'DataPieBaseChart', RadialBaseChart.$); return DataPieBaseChart; })();