@arcgis/charts-components 5.2.0-next.71 → 5.2.0-next.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +4 -2
- package/dist/cdn/{I5DMUUEL.js → 27QJPJG2.js} +1 -1
- package/dist/cdn/{4JWIBRGO.js → 2IT2RCIC.js} +1 -1
- package/dist/cdn/{K6F2LRKI.js → 3F3DSHMX.js} +1 -1
- package/dist/cdn/{3PDVKKKZ.js → 3O6KXZI3.js} +1 -1
- package/dist/cdn/{FJGG2VVZ.js → 3P2SRGLO.js} +1 -1
- package/dist/cdn/{OE7Q4MG5.js → 42A7W3OA.js} +1 -1
- package/dist/cdn/{4M4SAEH4.js → 4HZOLYYJ.js} +1 -1
- package/dist/cdn/{7KNUJIOC.js → 4MVV6KMX.js} +1 -1
- package/dist/cdn/{RCZLTGQI.js → 52AWRYBA.js} +1 -1
- package/dist/cdn/{54VUGIAU.js → 5TUEP4OK.js} +1 -1
- package/dist/cdn/{OAXHS4LE.js → 5X7Q3I6R.js} +1 -1
- package/dist/cdn/{PTUMQCFF.js → 6HRHDLP5.js} +1 -1
- package/dist/cdn/{2K4MIK4T.js → 6X64PHGO.js} +1 -1
- package/dist/cdn/{7REEJ3OW.js → 6XCI7UCI.js} +1 -1
- package/dist/cdn/{3WOYVXSZ.js → 6YZUX3IR.js} +1 -1
- package/dist/cdn/{JYLEN3VQ.js → 73JR3GLJ.js} +1 -1
- package/dist/cdn/{3FM3YR57.js → 7RSZDQRA.js} +1 -1
- package/dist/cdn/{BZ6FUIQF.js → AWL4BHAE.js} +1 -1
- package/dist/cdn/{27RKQQPS.js → BFX4S6V7.js} +1 -1
- package/dist/cdn/{LAPBDR32.js → BHH6HAXC.js} +1 -1
- package/dist/cdn/{4IO3VF3L.js → BJYYXABD.js} +1 -1
- package/dist/cdn/{WPLHZAZ3.js → BPRQJH3C.js} +1 -1
- package/dist/cdn/{25MA553Z.js → D4YMWPO7.js} +1 -1
- package/dist/cdn/{4JUR3VIE.js → DGJT4BLR.js} +1 -1
- package/dist/cdn/{CVFKL3S2.js → EPHJ2KVR.js} +1 -1
- package/dist/cdn/{L6DFXTSQ.js → FY42MP27.js} +1 -1
- package/dist/cdn/{IODRBLGT.js → G6RHXKZI.js} +1 -1
- package/dist/cdn/{GKEW5JYD.js → GBVHGXLI.js} +1 -1
- package/dist/cdn/{JAQYU6KP.js → GDCYGJRG.js} +1 -1
- package/dist/cdn/{NUHPR7BM.js → GEGDQRVU.js} +1 -1
- package/dist/cdn/{LIDWAYQH.js → GIW5FIBF.js} +28 -28
- package/dist/cdn/{3B6QE7OV.js → GW33HA7C.js} +1 -1
- package/dist/cdn/{GIH3U7YP.js → HE4DQBAF.js} +1 -1
- package/dist/cdn/{QAXXYD6N.js → HEV6CQ2O.js} +1 -1
- package/dist/cdn/{AVE3KXWQ.js → HFWQWWZX.js} +1 -1
- package/dist/cdn/{LPYRKK25.js → HGWVBXGI.js} +1 -1
- package/dist/cdn/{6TJIHHQF.js → HTDEFWRO.js} +1 -1
- package/dist/cdn/{VHW4OAKG.js → IMJT2ADR.js} +1 -1
- package/dist/cdn/{SL7NRRSJ.js → IOF3LHQS.js} +1 -1
- package/dist/cdn/{P6DBPQZO.js → IQAQH55N.js} +1 -1
- package/dist/cdn/{33JR3GH6.js → IRLDFW6T.js} +1 -1
- package/dist/cdn/{PIEX577B.js → J3UWN6IT.js} +1 -1
- package/dist/cdn/{3V4ZETXH.js → JCMK62IU.js} +1 -1
- package/dist/cdn/{IK4FPUFJ.js → JRLNI3JM.js} +1 -1
- package/dist/cdn/{OTFA727N.js → JU77OUXG.js} +1 -1
- package/dist/cdn/{4ODTQZJK.js → JZIH5BEO.js} +1 -1
- package/dist/cdn/{DT5BOM5F.js → KW4YJOEM.js} +1 -1
- package/dist/cdn/{WM6SCZHN.js → L44RZ2LJ.js} +1 -1
- package/dist/cdn/{2SLJKRSD.js → LFUOUZRD.js} +1 -1
- package/dist/cdn/{4DC4ARHU.js → LQU6DEB6.js} +1 -1
- package/dist/cdn/{QWCNHH6G.js → MHWVJW2G.js} +1 -1
- package/dist/cdn/{QT64PB4L.js → MQJ65BCX.js} +1 -1
- package/dist/cdn/{VNYRZDY5.js → N7PKDRUM.js} +1 -1
- package/dist/cdn/{E7QFC64H.js → NBS2RCOO.js} +1 -1
- package/dist/cdn/{MAC4MPUA.js → NORDWTUH.js} +1 -1
- package/dist/cdn/{IO6A77U4.js → NWH7AJ52.js} +1 -1
- package/dist/cdn/{ROG3HFDT.js → P5HKNAV6.js} +1 -1
- package/dist/cdn/{QSGJ3MAT.js → PCTPAU4P.js} +1 -1
- package/dist/cdn/{VAF3UIVA.js → PDSFLHBW.js} +1 -1
- package/dist/cdn/{3XB2RWHK.js → QAQ7XMIR.js} +1 -1
- package/dist/cdn/{BQORJ3LU.js → QQO3KMZ4.js} +1 -1
- package/dist/cdn/{XH57C72H.js → RI7OFHO5.js} +1 -1
- package/dist/cdn/{MOG5ZVLX.js → RLZXSSP6.js} +1 -1
- package/dist/cdn/{ZK5Z6BOX.js → S3LRWKAX.js} +1 -1
- package/dist/cdn/{BAFCVCT4.js → S3XBL7KR.js} +1 -1
- package/dist/cdn/{SSQPRUUN.js → SCVLTVPD.js} +1 -1
- package/dist/cdn/SG2DVYJ7.js +2 -0
- package/dist/cdn/{NF4EBNLN.js → SU5W5NFD.js} +1 -1
- package/dist/cdn/{WDUTZ6EO.js → SWD33GFB.js} +1 -1
- package/dist/cdn/{RCLHFY6O.js → TEVJHF4T.js} +1 -1
- package/dist/cdn/{O2BQ374Y.js → TTW52EWC.js} +1 -1
- package/dist/cdn/{F5AR3N3Z.js → UAUXUYSZ.js} +1 -1
- package/dist/cdn/{BNNBHYRP.js → UKVRMGYE.js} +1 -1
- package/dist/cdn/{NAGOJPIX.js → V35ALJHW.js} +2 -2
- package/dist/cdn/{CRQK4CKK.js → V5EPH7SJ.js} +1 -1
- package/dist/cdn/{QC3FMJKL.js → V6WZ4HG3.js} +1 -1
- package/dist/cdn/{V2FHLWYC.js → VLTMMRNO.js} +1 -1
- package/dist/cdn/{5NVOWYWZ.js → VPYOVHNR.js} +1 -1
- package/dist/cdn/{5GZDXWTQ.js → WDBM5DMV.js} +1 -1
- package/dist/cdn/{7XWR4EVM.js → WMXFQ3W5.js} +1 -1
- package/dist/cdn/{VUHFYOLC.js → YALJ3XEN.js} +1 -1
- package/dist/cdn/{EJWHEBKW.js → ZBP6VJMM.js} +1 -1
- package/dist/cdn/{OE7FIKPS.js → ZCCW2VVQ.js} +1 -1
- package/dist/cdn/{NP24UZGI.js → ZKB6OSA6.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/model/shared/setup-utils.js +1 -1
- package/dist/chunks/index2.js +1548 -1548
- package/dist/chunks/pie-chart-model.js +385 -334
- package/dist/chunks/type-guards2.js +15 -15
- package/dist/components/arcgis-chart/customElement.d.ts +11 -29
- package/dist/components/arcgis-chart/customElement.js +168 -163
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/model/pie-chart-model/pie-chart-legend-model.d.ts +7 -55
- package/dist/model/pie-chart-model/pie-chart-model.d.ts +59 -2
- package/dist/model/shared/type-guards.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cdn/CNI32IL3.js +0 -2
|
@@ -5,11 +5,11 @@ import type { ChartConfig } from "../../utils/types/index.js";
|
|
|
5
5
|
import type { ChartModel } from "../chart-model/chart-model.js";
|
|
6
6
|
import type { ModelParams } from "../interfaces/chart-interfaces.js";
|
|
7
7
|
import type { ModelTypes, PieChartDataSortingKinds, PieChartSlicesDisplay, PieChartDataModes } from "../interfaces/common.js";
|
|
8
|
+
import type { ModelWithLegend } from "../mixins/model-with-legend.js";
|
|
8
9
|
import type { ModelWithTooltips } from "../mixins/model-with-tooltips.js";
|
|
9
10
|
import type { WithColorMatch } from "../properties/color-match.js";
|
|
10
11
|
import type { WithDataLabelsSymbol } from "../properties/data-labels/data-labels-symbol.js";
|
|
11
12
|
import type { WithDataLabelsVisibility } from "../properties/data-labels/data-labels-visibility.js";
|
|
12
|
-
import type { PieChartLegendModel } from "./pie-chart-legend-model.js";
|
|
13
13
|
|
|
14
14
|
export class PieChartModel extends PieChartModelSuperclass {
|
|
15
15
|
/** Aggregation type for the pie chart. */
|
|
@@ -24,11 +24,19 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
24
24
|
accessor dataLabelsOffset: number;
|
|
25
25
|
/** Number of decimal places to display in the slice values. */
|
|
26
26
|
accessor decimalPlaces: number;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to display the category in the legend.
|
|
29
|
+
*
|
|
30
|
+
* @deprecated since 5.2. Use [displayCategoryOnLegendItems](https://developers.arcgis.com/javascript/latest/references/charts-components/model/pie-chart-model/pie-chart-model/#displayCategoryOnLegendItems) instead. This property will be removed from `PieChartModel` in 6.0.
|
|
31
|
+
*/
|
|
32
|
+
accessor displayCategory: boolean;
|
|
27
33
|
/**
|
|
28
34
|
* Whether to display the category on the data label.
|
|
29
35
|
* **Note:** If the setting is not found in the config, it will default to `true`.
|
|
30
36
|
*/
|
|
31
37
|
accessor displayCategoryOnDataLabel: boolean;
|
|
38
|
+
/** Whether to display the category on legend items. */
|
|
39
|
+
accessor displayCategoryOnLegendItems: boolean;
|
|
32
40
|
/**
|
|
33
41
|
* Display category value on tooltip setting from the chart config.
|
|
34
42
|
*
|
|
@@ -40,6 +48,8 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
40
48
|
* **Note:** If the setting is not found in the config, it will default to `true`.
|
|
41
49
|
*/
|
|
42
50
|
accessor displayNumericValueOnDataLabel: boolean;
|
|
51
|
+
/** Whether to display the numeric value on legend items. */
|
|
52
|
+
accessor displayNumericValueOnLegendItems: boolean;
|
|
43
53
|
/**
|
|
44
54
|
* Display numeric value on tooltip setting from the chart config.
|
|
45
55
|
*
|
|
@@ -52,6 +62,8 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
52
62
|
* **Note:** If the setting is not found in the config, it will default to `true`.
|
|
53
63
|
*/
|
|
54
64
|
accessor displayPercentageOnDataLabel: boolean;
|
|
65
|
+
/** Whether to display the percentage on legend items. */
|
|
66
|
+
accessor displayPercentageOnLegendItems: boolean;
|
|
55
67
|
/**
|
|
56
68
|
* Display percentage on tooltip setting from the chart config.
|
|
57
69
|
*
|
|
@@ -70,6 +82,9 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
70
82
|
accessor innerRadiusSize: number;
|
|
71
83
|
/** Character limit for the slice labels. */
|
|
72
84
|
accessor labelCharacterLimit: number | null;
|
|
85
|
+
/** Maximum width in pixels for legend item labels. */
|
|
86
|
+
get labelMaxWidth(): number;
|
|
87
|
+
set labelMaxWidth(value: number | undefined);
|
|
73
88
|
/**
|
|
74
89
|
* The pie chart data mode.
|
|
75
90
|
*
|
|
@@ -109,6 +124,9 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
109
124
|
accessor ticksSymbol: ISimpleLineSymbol | undefined;
|
|
110
125
|
/** Visibility of the ticks. */
|
|
111
126
|
accessor ticksVisibility: boolean;
|
|
127
|
+
/** Maximum width in pixels for legend value labels. */
|
|
128
|
+
get valueLabelMaxWidth(): number;
|
|
129
|
+
set valueLabelMaxWidth(value: number | undefined);
|
|
112
130
|
/** Prefix of the values of the slices. */
|
|
113
131
|
accessor valuePrefix: string | undefined;
|
|
114
132
|
/** Suffix of the values of the slice. */
|
|
@@ -117,6 +135,24 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
117
135
|
generateChartTitle(): string;
|
|
118
136
|
/** Gets the list of the category values for the chart. */
|
|
119
137
|
getCustomSortValues(): Promise<string[]>;
|
|
138
|
+
/**
|
|
139
|
+
* Gets the setting for displaying numerical values on legend items.
|
|
140
|
+
*
|
|
141
|
+
* @deprecated since 5.2. Use [displayNumericValueOnLegendItems](https://developers.arcgis.com/javascript/latest/references/charts-components/model/pie-chart-model/pie-chart-model/#displayNumericValueOnLegendItems) instead. This method will be removed from `PieChartModel` in 6.0.
|
|
142
|
+
*/
|
|
143
|
+
getDisplayNumericValue(): boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Gets the setting for displaying percentages on legend items.
|
|
146
|
+
*
|
|
147
|
+
* @deprecated since 5.2. Use [displayPercentageOnLegendItems](https://developers.arcgis.com/javascript/latest/references/charts-components/model/pie-chart-model/pie-chart-model/#displayPercentageOnLegendItems) instead. This method will be removed from `PieChartModel` in 6.0.
|
|
148
|
+
*/
|
|
149
|
+
getDisplayPercentage(): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Gets the maximum width in pixels for legend item labels.
|
|
152
|
+
*
|
|
153
|
+
* @deprecated since 5.2. Use [labelMaxWidth](https://developers.arcgis.com/javascript/latest/references/charts-components/model/pie-chart-model/pie-chart-model/#labelMaxWidth) instead. This method will be removed from `PieChartModel` in 6.0.
|
|
154
|
+
*/
|
|
155
|
+
getLabelMaxWidth(): number;
|
|
120
156
|
/**
|
|
121
157
|
* Gets the original name of the slice based on the slice index.
|
|
122
158
|
*
|
|
@@ -170,6 +206,27 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
170
206
|
resetAvailable(): boolean;
|
|
171
207
|
/** Resets the slices styling to the default styling. */
|
|
172
208
|
resetSlices(): void;
|
|
209
|
+
/**
|
|
210
|
+
* Sets the setting for displaying numerical values on legend items.
|
|
211
|
+
*
|
|
212
|
+
* @deprecated since 5.2. Use [displayNumericValueOnLegendItems](https://developers.arcgis.com/javascript/latest/references/charts-components/model/pie-chart-model/pie-chart-model/#displayNumericValueOnLegendItems) instead. This method will be removed from `PieChartModel` in 6.0.
|
|
213
|
+
* @param display
|
|
214
|
+
*/
|
|
215
|
+
setDisplayNumericValue(display: boolean): void;
|
|
216
|
+
/**
|
|
217
|
+
* Sets the setting for displaying percentages on legend items.
|
|
218
|
+
*
|
|
219
|
+
* @deprecated since 5.2. Use [displayPercentageOnLegendItems](https://developers.arcgis.com/javascript/latest/references/charts-components/model/pie-chart-model/pie-chart-model/#displayPercentageOnLegendItems) instead. This method will be removed from `PieChartModel` in 6.0.
|
|
220
|
+
* @param display
|
|
221
|
+
*/
|
|
222
|
+
setDisplayPercentage(display: boolean): void;
|
|
223
|
+
/**
|
|
224
|
+
* Sets the maximum width in pixels for legend item labels.
|
|
225
|
+
*
|
|
226
|
+
* @deprecated since 5.2. Use [labelMaxWidth](https://developers.arcgis.com/javascript/latest/references/charts-components/model/pie-chart-model/pie-chart-model/#labelMaxWidth) instead. This method will be removed from `PieChartModel` in 6.0.
|
|
227
|
+
* @param labelMaxWidth
|
|
228
|
+
*/
|
|
229
|
+
setLabelMaxWidth(labelMaxWidth: number | undefined): void;
|
|
173
230
|
/**
|
|
174
231
|
* Sets the color of the slice based on the slice index.
|
|
175
232
|
*
|
|
@@ -198,4 +255,4 @@ export class PieChartModel extends PieChartModelSuperclass {
|
|
|
198
255
|
*/
|
|
199
256
|
setup(params: ModelParams<ChartConfig<typeof ModelTypes.PieChart>>): Promise<void>;
|
|
200
257
|
}
|
|
201
|
-
declare const PieChartModelSuperclass: typeof ChartModel & typeof WithDataLabelsSymbol & typeof WithDataLabelsVisibility & typeof WithColorMatch & typeof ModelWithTooltips & typeof
|
|
258
|
+
declare const PieChartModelSuperclass: typeof ChartModel & typeof WithDataLabelsSymbol & typeof WithDataLabelsVisibility & typeof WithColorMatch & typeof ModelWithTooltips & typeof ModelWithLegend
|
|
@@ -160,6 +160,7 @@ export function isModelWithLegend(model: ChartModel | undefined): model is Model
|
|
|
160
160
|
/**
|
|
161
161
|
* Determines if the provided `model` is of type `PieChartLegendModel`.
|
|
162
162
|
*
|
|
163
|
+
* @deprecated since 5.2. Use [isPieChartModel](https://developers.arcgis.com/javascript/latest/references/charts-components/model/shared/type-guards/#isPieChartModel) instead. This function will be removed in 6.0.
|
|
163
164
|
* @param model - The model to check.
|
|
164
165
|
*/
|
|
165
166
|
export function isPieChartLegendModel(model: ChartModel | undefined): model is PieChartLegendModel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/charts-components",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.72",
|
|
4
4
|
"description": "Reusable ArcGIS charting Web Components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@amcharts/amcharts5": "~5.20.1",
|
|
33
33
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
34
34
|
"@lit/task": "^1.0.3",
|
|
35
|
-
"@zumer/snapdom": "^2.
|
|
35
|
+
"@zumer/snapdom": "^2.24.1",
|
|
36
36
|
"ajv": "6.12.6",
|
|
37
37
|
"d3-shape": "^3.2.0",
|
|
38
38
|
"jszip": "^3.10.1",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"luxon": "~3.7.2",
|
|
42
42
|
"simple-statistics": "^7.8.8",
|
|
43
43
|
"tslib": "^2.8.1",
|
|
44
|
-
"@arcgis/lumina": "5.2.0-next.
|
|
45
|
-
"@arcgis/toolkit": "5.2.0-next.
|
|
44
|
+
"@arcgis/lumina": "5.2.0-next.72",
|
|
45
|
+
"@arcgis/toolkit": "5.2.0-next.72"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@arcgis/core": "^5.2.0-next",
|
package/dist/cdn/CNI32IL3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import r from"./QC3FMJKL.js";import q from"./4ODTQZJK.js";import p from"./7KNUJIOC.js";import o from"./AVE3KXWQ.js";import n from"./L6DFXTSQ.js";import l from"./WDUTZ6EO.js";import j from"./OE7Q4MG5.js";import"./WDMYVS4F.js";import i from"./MOG5ZVLX.js";import g from"./EJWHEBKW.js";import e from"./4JWIBRGO.js";import a from"./NAGOJPIX.js";import{d as y,n as k}from"./CRNIOME2.js";import"./BGOWDCTO.js";import{L as O,O as h,ga as L,ia as N,o as b,pa as M}from"./USNJZCHH.js";import{f as m}from"./KX7KGXKQ.js";import{g as T}from"./SP2IPHWF.js";import"./LJTJTGIW.js";import{l as F}from"./7SBVBD4E.js";import{e as f,f as c}from"./QP5UAIC6.js";import"./KJZTU3DV.js";import{a as d}from"./K4APZJ2O.js";import"./BYSUABOV.js";export default $arcgis.t(([{yb:v,za:w},{p:A,q:I,r:G},,{c:t},,X,{b:z},{b:J},{a:P,b:Y,c:q,d:H},,{a:u,b:W,c:_,d:B,e:j,f:E,g:R,h:U,i:K,j:C,k:D,l:S}])=>{var se=i=>i.legend?.displayNumericValue??!1,te=(i,e)=>{e.series[0]?.type===d.PieSeries&&(e.legend===void 0&&(e.legend=h()),e.legend.displayNumericValue=i)},re=i=>i.legend?.displayCategory??!1,oe=(i,e)=>{e.series[0]?.type===d.PieSeries&&(e.legend===void 0&&(e.legend=h()),e.legend.displayCategory=i)},ae=i=>i.legend?.displayPercentage??!1,ne=(i,e)=>{e.series[0]?.type===d.PieSeries&&(e.legend===void 0&&(e.legend=h()),e.legend.displayPercentage=i)},le=i=>i.legend?.labelMaxWidth??200,ce=(i,e)=>{e.series[0]?.type===d.PieSeries&&(e.legend===void 0&&(e.legend=h()),e.legend.labelMaxWidth=i)},ge=i=>i.legend?.valueLabelMaxWidth??200,de=(i,e)=>{e.series[0]?.type===d.PieSeries&&(e.legend===void 0&&(e.legend=h()),e.legend.valueLabelMaxWidth=i)},pe=Object.defineProperty,he=Object.getOwnPropertyDescriptor,x=(i,e,s,o)=>{for(var n=he(e,s),l=i.length-1,g;l>=0;l--)(g=i[l])&&(n=g(e,s,n)||n);return n&&pe(e,s,n),n},p=class extends P{getDisplayNumericValue(){return se(this._config)}setDisplayNumericValue(e){te(e,this._config)}getDisplayPercentage(){return ae(this._config)}setDisplayPercentage(e){ne(e,this._config)}getLabelMaxWidth(){return le(this._config)}setLabelMaxWidth(e){ce(e,this._config)}get valueLabelMaxWidth(){return ge(this._config)}set valueLabelMaxWidth(e){de(e,this._config),this.emitConfigUpdate("valueLabelMaxWidth")}get displayCategory(){return re(this._config)}set displayCategory(e){oe(e,this._config),this.emitConfigUpdate("displayCategory")}};x([t],p.prototype,"setDisplayNumericValue");x([t],p.prototype,"setDisplayPercentage");x([t],p.prototype,"setLabelMaxWidth");var fe=[P];I(p,fe);var ue=i=>i.series?.[0]?.innerRadius,me=(i,e)=>{e.series?.[0]&&(e.series[0].innerRadius=i)},ye=i=>i.series?.[0]?.dataLabelsCharacterLimit,_e=(i,e)=>{e.series?.[0]&&(e.series[0].dataLabelsCharacterLimit=i)},Q=i=>i.series[0]?.startAngle,Se=(i,e)=>{e.series?.[0]&&(e.series[0].startAngle=i)},be=(i,e)=>{e.series?.[0]&&(e.series[0].endAngle=i)},Oe=i=>i.series?.[0]?.displayCategoryOnTooltip??!0,Le=i=>i.series?.[0]?.displayCategoryOnDataLabel??!0,ve=i=>i.series?.[0]?.displayNumericValueOnDataLabel??!0,Ie=i=>i.series?.[0]?.displayPercentageOnDataLabel??!1,Ce=i=>i.series?.[0]?.displayNumericValueOnTooltip??!0,De=i=>i.series?.[0]?.displayPercentageOnTooltip??!0,Pe=(i,e)=>{e.series[0]&&(e.series[0].displayPercentageOnTooltip=i)},xe=i=>i.series?.[0]?.valuePrefix,Ve=(i,e)=>{e.series?.[0]&&(e.series[0].valuePrefix=i)},Fe=i=>i.series?.[0]?.valueSuffix,Te=(i,e)=>{e.series?.[0]&&(e.series[0].valueSuffix=i)},Ne=i=>i.series?.[0]?.percentagePrefix,Me=(i,e)=>{e.series?.[0]&&(e.series[0].percentagePrefix=i)},ke=i=>i.series?.[0]?.percentageSuffix,we=(i,e)=>{e.series?.[0]&&(e.series[0].percentageSuffix=i)},Ae=i=>{let e,s=i.series?.[0];return s?.displayNumericValueOnDataLabel===!0&&s?.displayPercentageOnDataLabel===!0?e=c.Both:s?.displayNumericValueOnDataLabel===!0?e=c.Value:e=c.Percentage,e},Ge=(i,e)=>{let s=i===c.Value||i===c.Both,o=i===c.Percentage||i===c.Both;e.series?.[0]&&(e.series[0].displayNumericValueOnDataLabel=s,e.series[0].displayPercentageOnDataLabel=o),e.legend&&(e.legend={...e.legend,displayNumericValue:s,displayPercentage:o})},ze=i=>i.series?.[0]?.alignDataLabels??!1,We=(i,e)=>{e.series[0]&&(e.series[0].alignDataLabels=i)},Be=i=>i.series?.[0]?.dataLabelsInside??!1,je=(i,e)=>{e.series[0]&&(e.series[0].dataLabelsInside=i)},Ee=i=>i.series?.[0]?.dataLabelsOffset??10,Re=(i,e)=>{e.series[0]&&(e.series[0].dataLabelsOffset=i)},Ue=i=>i.series?.[0]?.numericValueFormat?.intlOptions?.minimumFractionDigits,Ke=(i,e)=>{e.series?.[0]&&(e.series[0].numericValueFormat??=O(),e.series[0].numericValueFormat.intlOptions.minimumFractionDigits=i,e.series[0].numericValueFormat.intlOptions.maximumFractionDigits=i,e.series[0].percentValueFormat??=O(),e.series[0].percentValueFormat.intlOptions.minimumFractionDigits=i,e.series[0].percentValueFormat.intlOptions.maximumFractionDigits=i)},Xe=i=>i.series?.[0]?.optimizeDataLabelsOverlapping??!1,Ye=(i,e)=>{e.series[0]&&(e.series[0].optimizeDataLabelsOverlapping=i)},qe=i=>i.series[0]?.ticks?.visible??!1,He=(i,e)=>{e.series?.[0]&&(e.series[0].ticks??=L(),e.series[0].ticks.visible=i)},Je=i=>i.series[0]?.ticks?.lineSymbol,Qe=(i,e)=>{i&&e.series?.[0]&&(e.series[0].ticks??=L(),e.series[0].ticks.lineSymbol=T(i))},Ze=(i,e)=>e.series?.[0]?.slices?.[i]?.originalLabel,$e=(i,e)=>e.series?.[0]?.slices?.[i]?.label,ei=(i,e,s)=>{s.series?.[0]?.slices?.[e]&&(s.series[0].slices[e].label=i)},ii=(i,e)=>e.series?.[0]?.slices?.[i]?.fillSymbol?.color,si=(i,e,s)=>{let o=s.series?.[0]?.slices?.[e]?.fillSymbol;o!==void 0?(o.color=i,o.outline!==void 0?o.outline.color=i:o.outline={type:m.SLS,color:i}):s.series?.[0]?.slices?.[e]!==void 0&&(s.series[0].slices[e].fillSymbol={type:m.SFS,color:i,outline:{type:m.SLS,color:i}})},ti=i=>i.series?.[0]?.slices?.map(e=>e.sliceId),Z=(i,e)=>{e.series?.[0]?.slices?.sort((s,o)=>i.findIndex(n=>s.sliceId===n)-i.findIndex(n=>o.sliceId===n))},ri=i=>i.series?.[0]?.sliceGrouping,$=(i,e)=>{e.series?.[0]&&(e.series[0].sliceGrouping=i)},ee=i=>i.series?.[0]?.sliceGrouping?.percentageThreshold,oi=(i,e)=>{e.series?.[0]?.sliceGrouping!==void 0?e.series[0].sliceGrouping.percentageThreshold=i:e.series[0].sliceGrouping={sliceId:b.defaultGroupOfSlicesId,percentageThreshold:i}},ai=i=>i.series?.[0]?.slices,ie=(i,e)=>{e.series?.[0]&&(e.series[0].slices=i)},ni=i=>{ie(void 0,i),$({sliceId:b.defaultGroupOfSlicesId,percentageThreshold:ee(i)??0},i)},li=(i,e)=>e.series[0]?.slices?.[i]?.sliceId,ci=(i,e)=>e.series[0]?.slices?.findIndex(s=>s.sliceId===i),gi=i=>i.series[0]?.slices?.length??0,di=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,a=(i,e,s,o)=>{for(var n=pi(e,s),l=i.length-1,g;l>=0;l--)(g=i[l])&&(n=g(e,s,n)||n);return n&&di(e,s,n),n},r=class extends X{constructor(){super(...arguments),this._chartType=d.PieSeries,this._mode=f.Category,this._groupedSliceIds=[],this._customizedSliceIds=[]}async setup(e){await this.loadConfigFromLayer(e);let{config:s}=e;if(s!==void 0){let o=v(s.series)!==y.PieFromFields?f.Category:f.Fields;this._mode=S({category:u(this._config),numericFields:_(this._config),fallbackMode:o})}typeof this.resolveSetup=="function"&&this.resolveSetup()}get category(){return u(this._config)}set category(e){(!z(this._config)||e.trim()!=="")&&(this._mode=S({category:e,numericFields:_(this._config),fallbackMode:this._mode}),R({newCategory:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,mode:this._mode}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange")))}get numericFields(){return _(this._config)}set numericFields(e){typeof e=="string"&&(e=[e]),this.layerInfo===void 0||A(this.layerInfo.layerFieldsInfo,e)?(this._mode=S({category:u(this._config),numericFields:e,fallbackMode:this._mode}),K({newNumericFields:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,mode:this._mode}),this._config.series[0].slices=this._config.series[0].slices?.filter(s=>s.fillSymbol?.color!==void 0&&this._customizedSliceIds.includes(s.sliceId??"")),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))):F("error","pie-chart-model","Invalid `numericFields`")}get aggregationType(){return B(this._config,this._mode)}set aggregationType(e){U({newAggregationType:e,config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,mode:this._mode}),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}getSortOrder(){return W(this._config,this._mode)}setSortOrder(e,s){E({newSortOrderKind:e,config:this._config,orderByList:s})}get orderByList(){return C(this._config,this._mode)}set orderByList(e){D({values:e,config:this._config,mode:this._mode})}get mode(){return this._mode}set mode(e){this._mode=e}async getCustomSortValues(){let e=u(this._config),s=v(this._config.series),o=[];return s===y.PieFromFields?o=this.numericFields:e.trim()!==""&&s===y.PieFromCategory&&(o=await G({category:e,config:this._config,layerInfo:this.layerInfo,errorStrings:this.commonStrings.errorStrings})),o}moveCustomSortValuesInOrderByList(e,s){let o=C(this._config,this._mode),[n]=o.splice(e,1);o.splice(s,0,n),D({values:o,config:this._config,mode:this._mode})}get ticksSymbol(){return Je(this._config)}set ticksSymbol(e){Qe(e,this._config)}get slices(){return ai(this._config)}set slices(e){ie(e,this._config)}get groupedSliceIds(){return this._groupedSliceIds}set groupedSliceIds(e){this._groupedSliceIds=e}get sliceGrouping(){return ri(this._config)}set sliceGrouping(e){$(e,this._config)}get innerRadiusSize(){return ue(this._config)??0}set innerRadiusSize(e){me(e,this._config)}get groupingThreshold(){return ee(this._config)??0}set groupingThreshold(e){oi(e,this._config)}get labelCharacterLimit(){return ye(this._config)??null}set labelCharacterLimit(e){_e(e,this._config)}get decimalPlaces(){return Ue(this._config)??1}set decimalPlaces(e){Ke(e,this._config)}get displayType(){return Ae(this._config)}set displayType(e){Ge(e,this._config)}generateDefaultConfig(){let e=M(this.commonStrings);return e.series=[N(this.commonStrings,w(this.layerInfo.layer).idField)],e}getOriginalSliceName(e){return Ze(e,this._config)}getSliceName(e){return $e(e,this._config)}setSliceName(e,s){let o=this.getSliceId(s);o!==void 0&&this._customizedSliceIds.push(o),ei(e,s,this._config)}getSliceColor(e){return ii(e,this._config)}setSliceColor(e,s){let o=this.getSliceId(s);e!==void 0&&o!==void 0&&this._customizedSliceIds.push(o),si(e,s,this._config)}get orderOfSlices(){return ti(this._config)}set orderOfSlices(e){e!==void 0&&Z(e,this._config)}moveSeries(e,s){let o=this.orderOfSlices;if(o!==void 0){let[n]=o.splice(e,1);o.splice(s,0,n),Z(o,this._config)}}getSliceId(e){return li(e,this._config)}getSliceIndex(e){return ci(e,this._config)}getSlicesLength(){return gi(this._config)}resetSlices(){this._customizedSliceIds=[],ni(this._config)}resetAvailable(){let e=!this.colorMatch,s=!1,o=this.slices?.length??0;for(let n=0;n<o;n+=1){let l=this.getOriginalSliceName(n),g=this.getSliceName(n),V=this._mode===f.Fields?k(this.layerInfo?.layerFieldsInfo,l?.toString()):l;if(V!==void 0&&V?.toString()!==g?.toString()){s=!0;break}}return this.sliceGrouping?.originalLabel!==void 0&&this.sliceGrouping?.label!==this.sliceGrouping.originalLabel&&(s=!0),e||s}get ticksVisibility(){return qe(this._config)}set ticksVisibility(e){He(e,this._config)}get startAngle(){return Q(this._config)}set startAngle(e){Se(e,this._config)}get endAngle(){return Q(this._config)}set endAngle(e){be(e,this._config)}get displayCategoryOnDataLabel(){return Le(this._config)}set displayCategoryOnDataLabel(e){this.guardSetterFromAsyncOverwrite(()=>{this._config.series[0].displayCategoryOnDataLabel=e,this.emitConfigUpdate("displayCategoryOnDataLabel")})}get displayCategoryValueOnTooltip(){return Oe(this._config)}set displayCategoryValueOnTooltip(e){this._config.series[0].displayCategoryOnTooltip=e}get displayNumericValueOnDataLabel(){return ve(this._config)}set displayNumericValueOnDataLabel(e){this.guardSetterFromAsyncOverwrite(()=>{this._config.series[0].displayNumericValueOnDataLabel=e,this.emitConfigUpdate("displayNumericValueOnDataLabel")})}get displayPercentageOnDataLabel(){return Ie(this._config)}set displayPercentageOnDataLabel(e){this.guardSetterFromAsyncOverwrite(()=>{this._config.series[0].displayPercentageOnDataLabel=e,this.emitConfigUpdate("displayPercentageOnDataLabel")})}get displayNumericValueOnTooltip(){return Ce(this._config)}set displayNumericValueOnTooltip(e){this._config.series[0].displayNumericValueOnTooltip=e}get displayPercentageOnTooltip(){return De(this._config)}set displayPercentageOnTooltip(e){Pe(e,this._config)}get valuePrefix(){return xe(this._config)}set valuePrefix(e){Ve(e,this._config)}get valueSuffix(){return Fe(this._config)}set valueSuffix(e){Te(e,this._config)}get percentagePrefix(){return Ne(this._config)}set percentagePrefix(e){Me(e,this._config)}get percentageSuffix(){return ke(this._config)}set percentageSuffix(e){we(e,this._config)}get dataLabelsOffset(){return Ee(this._config)}set dataLabelsOffset(e){Re(e,this._config)}get alignDataLabels(){return ze(this._config)}set alignDataLabels(e){We(e,this._config)}get dataLabelsInside(){return Be(this._config)}set dataLabelsInside(e){je(e,this._config)}get optimizeDataLabelsOverlapping(){return Xe(this._config)}set optimizeDataLabelsOverlapping(e){Ye(e,this._config)}generateChartTitle(){return j({config:this._config,layerInfo:this.layerInfo,commonStrings:this.commonStrings,mode:this._mode})}};a([t],r.prototype,"category");a([t],r.prototype,"numericFields");a([t],r.prototype,"aggregationType");a([t],r.prototype,"setSortOrder");a([t],r.prototype,"orderByList");a([t],r.prototype,"mode");a([t],r.prototype,"moveCustomSortValuesInOrderByList");a([t],r.prototype,"ticksSymbol");a([t],r.prototype,"slices");a([t],r.prototype,"groupedSliceIds");a([t],r.prototype,"sliceGrouping");a([t],r.prototype,"innerRadiusSize");a([t],r.prototype,"groupingThreshold");a([t],r.prototype,"labelCharacterLimit");a([t],r.prototype,"decimalPlaces");a([t],r.prototype,"displayType");a([t],r.prototype,"setSliceName");a([t],r.prototype,"setSliceColor");a([t],r.prototype,"orderOfSlices");a([t],r.prototype,"moveSeries");a([t],r.prototype,"resetSlices");a([t],r.prototype,"ticksVisibility");a([t],r.prototype,"startAngle");a([t],r.prototype,"endAngle");a([t],r.prototype,"displayCategoryValueOnTooltip");a([t],r.prototype,"displayNumericValueOnTooltip");a([t],r.prototype,"displayPercentageOnTooltip");a([t],r.prototype,"valuePrefix");a([t],r.prototype,"valueSuffix");a([t],r.prototype,"percentagePrefix");a([t],r.prototype,"percentageSuffix");a([t],r.prototype,"dataLabelsOffset");a([t],r.prototype,"alignDataLabels");a([t],r.prototype,"dataLabelsInside");a([t],r.prototype,"optimizeDataLabelsOverlapping");var hi=[p,Y,q,H,J];I(r,hi);return r},a,e,g,i,j,l,n,o,p,q,r)
|