genesys-spark-chart-components 4.12.1-beta.1 → 4.29.0-beta.0
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 +2 -2
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/genesys-chart-webcomponents.cjs.js +5 -3
- package/dist/cjs/gux-chart-column-beta.cjs.entry.js +124 -123
- package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +213 -212
- package/dist/cjs/gux-chart-line-beta.cjs.entry.js +120 -119
- package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +96 -95
- package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +126 -125
- package/dist/cjs/gux-visualization-beta.cjs.entry.js +213 -213
- package/dist/cjs/{index-1e13a15f.js → index-a4712860.js} +185 -63
- package/dist/cjs/loader.cjs.js +4 -2
- package/dist/cjs/log-error-28c7064e.js +21 -0
- package/dist/cjs/{usage-30f04ec3.js → usage-3d9281d1.js} +63 -63
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/beta/gux-chart-column/gux-chart-column.js +324 -324
- package/dist/collection/components/beta/gux-chart-column/gux-chart-column.locale.js +88 -88
- package/dist/collection/components/beta/gux-chart-column/tests/gux-column-chart.spec.js +16 -16
- package/dist/collection/components/beta/gux-chart-donut/gux-chart-donut.js +550 -550
- package/dist/collection/components/beta/gux-chart-donut/tests/gux-chart-donut.spec.js +5 -5
- package/dist/collection/components/beta/gux-chart-line/gux-chart-line.js +375 -375
- package/dist/collection/components/beta/gux-chart-line/gux-chart-line.locale.js +88 -88
- package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.e2e.js +13 -13
- package/dist/collection/components/beta/gux-chart-line/tests/gux-chart-line.spec.js +16 -16
- package/dist/collection/components/beta/gux-chart-pie/gux-chart-pie.js +266 -266
- package/dist/collection/components/beta/gux-chart-pie/tests/gux-chart-pie.spec.js +5 -5
- package/dist/collection/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.js +347 -347
- package/dist/collection/components/beta/gux-chart-scatter-plot/tests/gux-chart-scatter-plot.spec.js +27 -27
- package/dist/collection/components/beta/gux-visualization/gux-visualization.js +133 -133
- package/dist/collection/components/beta/gux-visualization/gux-visualization.locale.js +88 -88
- package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.e2e.js +25 -25
- package/dist/collection/components/beta/gux-visualization/tests/gux-visualization.spec.js +26 -26
- package/dist/collection/i18n/fetchResources.js +7 -7
- package/dist/collection/i18n/index.js +56 -56
- package/dist/collection/test/axeConfig.js +4 -4
- package/dist/collection/test/e2eTestUtils.js +14 -14
- package/dist/collection/test/specTestUtils.js +5 -5
- package/dist/collection/utils/dom/get-closest-element.js +12 -12
- package/dist/collection/utils/error/log-error.js +2 -2
- package/dist/collection/utils/theme/color-palette.js +10 -10
- package/dist/collection/utils/tracking/usage.js +47 -47
- package/dist/collection/utils/tracking/usage.spec.js +108 -108
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/genesys-chart-webcomponents.js +6 -4
- package/dist/esm/gux-chart-column-beta.entry.js +124 -123
- package/dist/esm/gux-chart-donut-beta.entry.js +213 -212
- package/dist/esm/gux-chart-line-beta.entry.js +120 -119
- package/dist/esm/gux-chart-pie-beta.entry.js +96 -95
- package/dist/esm/gux-chart-scatter-plot-beta.entry.js +126 -125
- package/dist/esm/gux-visualization-beta.entry.js +213 -213
- package/dist/esm/{index-701d93cf.js → index-82fd7406.js} +185 -63
- package/dist/esm/loader.js +5 -3
- package/dist/esm/log-error-ff9bdda4.js +18 -0
- package/dist/esm/{usage-61eee3bd.js → usage-4d835ee1.js} +63 -63
- package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.css +1 -1
- package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
- package/dist/genesys-chart-webcomponents/p-01bbadbf.entry.js +11 -0
- package/dist/genesys-chart-webcomponents/{p-137f5b8f.entry.js → p-12eb9928.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/p-1bc0cc3a.js +2 -0
- package/dist/genesys-chart-webcomponents/{p-b5179379.entry.js → p-25bdbf17.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-c3aa8578.entry.js → p-74011efc.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-97c45977.js → p-7e62b207.js} +1 -1
- package/dist/genesys-chart-webcomponents/p-e1255160.js +1 -0
- package/dist/genesys-chart-webcomponents/{p-d9928f8c.entry.js → p-e80b1b1c.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-d4a346df.entry.js → p-f6cebcf8.entry.js} +1 -1
- package/dist/stencil-wrapper.js +1 -1
- package/dist/types/components/beta/gux-chart-column/gux-chart-column.d.ts +45 -45
- package/dist/types/components/beta/gux-chart-column/gux-chart-column.locale.d.ts +20 -20
- package/dist/types/components/beta/gux-chart-donut/gux-chart-donut.d.ts +30 -30
- package/dist/types/components/beta/gux-chart-line/gux-chart-line.d.ts +44 -44
- package/dist/types/components/beta/gux-chart-line/gux-chart-line.locale.d.ts +20 -20
- package/dist/types/components/beta/gux-chart-pie/gux-chart-pie.d.ts +19 -19
- package/dist/types/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.d.ts +48 -48
- package/dist/types/components/beta/gux-visualization/gux-visualization.d.ts +13 -13
- package/dist/types/components/beta/gux-visualization/gux-visualization.locale.d.ts +20 -20
- package/dist/types/components.d.ts +12 -0
- package/dist/types/i18n/fetchResources.d.ts +3 -3
- package/dist/types/i18n/index.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +10 -0
- package/dist/types/stencil-wrapper.d.ts +1 -1
- package/dist/types/test/axeConfig.d.ts +4 -4
- package/dist/types/test/e2eTestUtils.d.ts +4 -4
- package/dist/types/test/jestMatcherUtils.d.ts +4 -4
- package/dist/types/utils/tracking/usage.d.ts +11 -11
- package/package.json +24 -24
- package/dist/cjs/log-error-c46b4b4c.js +0 -21
- package/dist/component-specs.json +0 -187
- package/dist/esm/log-error-0fc61f6f.js +0 -18
- package/dist/genesys-chart-webcomponents/p-3e4b3dbc.js +0 -2
- package/dist/genesys-chart-webcomponents/p-b901e9e0.entry.js +0 -11
- /package/dist/genesys-chart-webcomponents/{p-82f0ea01.js → p-f50e3789.js} +0 -0
|
@@ -6,279 +6,279 @@ import { VISUALIZATION_COLORS } from "../../../utils/theme/color-palette";
|
|
|
6
6
|
const DEFAULT_COLOR_FIELD_NAME = 'category';
|
|
7
7
|
const DEFAULT_LABEL_FIELD_NAME = 'value';
|
|
8
8
|
export class GuxPieChart {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
constructor() {
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
this.baseChartSpec = {
|
|
12
|
+
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
|
|
13
|
+
config: {
|
|
14
|
+
legend: {
|
|
15
|
+
symbolType: 'circle'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
encoding: {
|
|
19
|
+
theta: { field: 'value', type: 'quantitative', stack: true },
|
|
20
|
+
color: {
|
|
21
|
+
field: DEFAULT_COLOR_FIELD_NAME,
|
|
22
|
+
type: 'nominal',
|
|
23
|
+
scale: { range: VISUALIZATION_COLORS },
|
|
24
|
+
legend: null
|
|
25
|
+
},
|
|
26
|
+
tooltip: { aggregate: 'count', type: 'quantitative' }
|
|
27
|
+
},
|
|
28
|
+
layer: [
|
|
29
|
+
{
|
|
30
|
+
mark: { type: 'arc', outerRadius: 80 }
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
mark: { type: 'text', radius: 90 },
|
|
34
|
+
encoding: {
|
|
35
|
+
text: { field: DEFAULT_LABEL_FIELD_NAME, type: 'quantitative' }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
view: { stroke: null }
|
|
40
|
+
};
|
|
41
|
+
this.chartData = undefined;
|
|
42
|
+
this.includeLegend = undefined;
|
|
43
|
+
this.legendPosition = 'right';
|
|
44
|
+
this.legendTitle = undefined;
|
|
45
|
+
this.colorFieldName = undefined;
|
|
46
|
+
this.outerRadius = undefined;
|
|
47
|
+
this.labelRadius = undefined;
|
|
48
|
+
this.labelField = undefined;
|
|
49
|
+
this.embedOptions = undefined;
|
|
50
|
+
}
|
|
51
|
+
parseData() {
|
|
52
|
+
if (!this.outerRadius) {
|
|
53
|
+
logError(this.root, 'requires outer-radius');
|
|
54
|
+
}
|
|
55
|
+
let chartData = {};
|
|
56
|
+
if (this.chartData) {
|
|
57
|
+
chartData = { data: this.chartData };
|
|
58
|
+
}
|
|
59
|
+
if (this.includeLegend) {
|
|
60
|
+
this.baseChartSpec.encoding.color.legend = true;
|
|
61
|
+
}
|
|
62
|
+
if (this.legendPosition) {
|
|
63
|
+
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
16
64
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
65
|
+
const colorFieldName = this.colorFieldName || DEFAULT_COLOR_FIELD_NAME;
|
|
66
|
+
if (colorFieldName) {
|
|
67
|
+
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
68
|
+
}
|
|
69
|
+
const legendTitle = this.legendTitle;
|
|
70
|
+
if (legendTitle) {
|
|
71
|
+
this.baseChartSpec.encoding.color.title = legendTitle;
|
|
72
|
+
}
|
|
73
|
+
const outerRadius = this.outerRadius;
|
|
74
|
+
this.baseChartSpec.layer = [
|
|
75
|
+
{
|
|
76
|
+
mark: { type: 'arc', outerRadius }
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
const labelRadius = this.labelRadius;
|
|
80
|
+
const labelField = this.labelField || DEFAULT_LABEL_FIELD_NAME;
|
|
81
|
+
if (labelRadius) {
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
83
|
+
this.baseChartSpec.layer.push({
|
|
84
|
+
mark: { type: 'text', radius: labelRadius },
|
|
85
|
+
encoding: {
|
|
86
|
+
text: { field: labelField, type: 'quantitative' }
|
|
87
|
+
}
|
|
88
|
+
});
|
|
37
89
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
this.chartData = undefined;
|
|
42
|
-
this.includeLegend = undefined;
|
|
43
|
-
this.legendPosition = 'right';
|
|
44
|
-
this.legendTitle = undefined;
|
|
45
|
-
this.colorFieldName = undefined;
|
|
46
|
-
this.outerRadius = undefined;
|
|
47
|
-
this.labelRadius = undefined;
|
|
48
|
-
this.labelField = undefined;
|
|
49
|
-
this.embedOptions = undefined;
|
|
50
|
-
}
|
|
51
|
-
parseData() {
|
|
52
|
-
if (!this.outerRadius) {
|
|
53
|
-
logError(this.root, 'requires outer-radius');
|
|
90
|
+
const spec = Object.assign(this.baseChartSpec, chartData);
|
|
91
|
+
this.visualizationSpec = spec;
|
|
54
92
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
93
|
+
componentWillLoad() {
|
|
94
|
+
trackComponent(this.root);
|
|
95
|
+
this.parseData();
|
|
58
96
|
}
|
|
59
|
-
|
|
60
|
-
|
|
97
|
+
render() {
|
|
98
|
+
return (h("gux-visualization-beta", { key: 'b3049772a9d436bf4d6aa1b0e9ebe21a9d9e84e9', visualizationSpec: this.visualizationSpec }));
|
|
61
99
|
}
|
|
62
|
-
|
|
63
|
-
|
|
100
|
+
static get is() { return "gux-chart-pie-beta"; }
|
|
101
|
+
static get encapsulation() { return "shadow"; }
|
|
102
|
+
static get originalStyleUrls() {
|
|
103
|
+
return {
|
|
104
|
+
"$": ["gux-chart-pie.scss"]
|
|
105
|
+
};
|
|
64
106
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
107
|
+
static get styleUrls() {
|
|
108
|
+
return {
|
|
109
|
+
"$": ["gux-chart-pie.css"]
|
|
110
|
+
};
|
|
68
111
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
112
|
+
static get properties() {
|
|
113
|
+
return {
|
|
114
|
+
"chartData": {
|
|
115
|
+
"type": "unknown",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "Record<string, any>",
|
|
119
|
+
"resolved": "{ [x: string]: any; }",
|
|
120
|
+
"references": {
|
|
121
|
+
"Record": {
|
|
122
|
+
"location": "global",
|
|
123
|
+
"id": "global::Record"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": "Data to be rendered in the chart.\nData field names must match the values you set in xFieldName and yFieldName"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"includeLegend": {
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"mutable": false,
|
|
137
|
+
"complexType": {
|
|
138
|
+
"original": "boolean",
|
|
139
|
+
"resolved": "boolean",
|
|
140
|
+
"references": {}
|
|
141
|
+
},
|
|
142
|
+
"required": false,
|
|
143
|
+
"optional": false,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": ""
|
|
147
|
+
},
|
|
148
|
+
"attribute": "include-legend",
|
|
149
|
+
"reflect": false
|
|
150
|
+
},
|
|
151
|
+
"legendPosition": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"mutable": false,
|
|
154
|
+
"complexType": {
|
|
155
|
+
"original": "| 'left'\n | 'right'\n | 'top'\n | 'bottom'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n | 'none'",
|
|
156
|
+
"resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"left\" | \"none\" | \"right\" | \"top\" | \"top-left\" | \"top-right\"",
|
|
157
|
+
"references": {}
|
|
158
|
+
},
|
|
159
|
+
"required": false,
|
|
160
|
+
"optional": false,
|
|
161
|
+
"docs": {
|
|
162
|
+
"tags": [],
|
|
163
|
+
"text": ""
|
|
164
|
+
},
|
|
165
|
+
"attribute": "legend-position",
|
|
166
|
+
"reflect": false,
|
|
167
|
+
"defaultValue": "'right'"
|
|
168
|
+
},
|
|
169
|
+
"legendTitle": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"mutable": false,
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "string",
|
|
174
|
+
"resolved": "string",
|
|
175
|
+
"references": {}
|
|
176
|
+
},
|
|
177
|
+
"required": false,
|
|
178
|
+
"optional": false,
|
|
179
|
+
"docs": {
|
|
180
|
+
"tags": [],
|
|
181
|
+
"text": ""
|
|
182
|
+
},
|
|
183
|
+
"attribute": "legend-title",
|
|
184
|
+
"reflect": false
|
|
185
|
+
},
|
|
186
|
+
"colorFieldName": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"mutable": false,
|
|
189
|
+
"complexType": {
|
|
190
|
+
"original": "string",
|
|
191
|
+
"resolved": "string",
|
|
192
|
+
"references": {}
|
|
193
|
+
},
|
|
194
|
+
"required": false,
|
|
195
|
+
"optional": false,
|
|
196
|
+
"docs": {
|
|
197
|
+
"tags": [],
|
|
198
|
+
"text": ""
|
|
199
|
+
},
|
|
200
|
+
"attribute": "color-field-name",
|
|
201
|
+
"reflect": false
|
|
202
|
+
},
|
|
203
|
+
"outerRadius": {
|
|
204
|
+
"type": "number",
|
|
205
|
+
"mutable": false,
|
|
206
|
+
"complexType": {
|
|
207
|
+
"original": "number",
|
|
208
|
+
"resolved": "number",
|
|
209
|
+
"references": {}
|
|
210
|
+
},
|
|
211
|
+
"required": false,
|
|
212
|
+
"optional": false,
|
|
213
|
+
"docs": {
|
|
214
|
+
"tags": [],
|
|
215
|
+
"text": ""
|
|
216
|
+
},
|
|
217
|
+
"attribute": "outer-radius",
|
|
218
|
+
"reflect": false
|
|
219
|
+
},
|
|
220
|
+
"labelRadius": {
|
|
221
|
+
"type": "number",
|
|
222
|
+
"mutable": false,
|
|
223
|
+
"complexType": {
|
|
224
|
+
"original": "number",
|
|
225
|
+
"resolved": "number",
|
|
226
|
+
"references": {}
|
|
227
|
+
},
|
|
228
|
+
"required": false,
|
|
229
|
+
"optional": false,
|
|
230
|
+
"docs": {
|
|
231
|
+
"tags": [],
|
|
232
|
+
"text": ""
|
|
233
|
+
},
|
|
234
|
+
"attribute": "label-radius",
|
|
235
|
+
"reflect": false
|
|
236
|
+
},
|
|
237
|
+
"labelField": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"mutable": false,
|
|
240
|
+
"complexType": {
|
|
241
|
+
"original": "string",
|
|
242
|
+
"resolved": "string",
|
|
243
|
+
"references": {}
|
|
244
|
+
},
|
|
245
|
+
"required": false,
|
|
246
|
+
"optional": false,
|
|
247
|
+
"docs": {
|
|
248
|
+
"tags": [],
|
|
249
|
+
"text": ""
|
|
250
|
+
},
|
|
251
|
+
"attribute": "label-field",
|
|
252
|
+
"reflect": false
|
|
253
|
+
},
|
|
254
|
+
"embedOptions": {
|
|
255
|
+
"type": "unknown",
|
|
256
|
+
"mutable": false,
|
|
257
|
+
"complexType": {
|
|
258
|
+
"original": "EmbedOptions",
|
|
259
|
+
"resolved": "EmbedOptions<string, Renderers>",
|
|
260
|
+
"references": {
|
|
261
|
+
"EmbedOptions": {
|
|
262
|
+
"location": "import",
|
|
263
|
+
"path": "vega-embed",
|
|
264
|
+
"id": "../../node_modules/vega-embed/build/vega-embed.module.d.ts::EmbedOptions"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": false,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": ""
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
};
|
|
72
276
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const labelRadius = this.labelRadius;
|
|
80
|
-
const labelField = this.labelField || DEFAULT_LABEL_FIELD_NAME;
|
|
81
|
-
if (labelRadius) {
|
|
82
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
83
|
-
this.baseChartSpec.layer.push({
|
|
84
|
-
mark: { type: 'text', radius: labelRadius },
|
|
85
|
-
encoding: {
|
|
86
|
-
text: { field: labelField, type: 'quantitative' }
|
|
87
|
-
}
|
|
88
|
-
});
|
|
277
|
+
static get elementRef() { return "root"; }
|
|
278
|
+
static get watchers() {
|
|
279
|
+
return [{
|
|
280
|
+
"propName": "chartData",
|
|
281
|
+
"methodName": "parseData"
|
|
282
|
+
}];
|
|
89
283
|
}
|
|
90
|
-
const spec = Object.assign(this.baseChartSpec, chartData);
|
|
91
|
-
this.visualizationSpec = spec;
|
|
92
|
-
}
|
|
93
|
-
componentWillLoad() {
|
|
94
|
-
trackComponent(this.root);
|
|
95
|
-
this.parseData();
|
|
96
|
-
}
|
|
97
|
-
render() {
|
|
98
|
-
return (h("gux-visualization-beta", { visualizationSpec: this.visualizationSpec }));
|
|
99
|
-
}
|
|
100
|
-
static get is() { return "gux-chart-pie-beta"; }
|
|
101
|
-
static get encapsulation() { return "shadow"; }
|
|
102
|
-
static get originalStyleUrls() {
|
|
103
|
-
return {
|
|
104
|
-
"$": ["gux-chart-pie.scss"]
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
static get styleUrls() {
|
|
108
|
-
return {
|
|
109
|
-
"$": ["gux-chart-pie.css"]
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
static get properties() {
|
|
113
|
-
return {
|
|
114
|
-
"chartData": {
|
|
115
|
-
"type": "unknown",
|
|
116
|
-
"mutable": false,
|
|
117
|
-
"complexType": {
|
|
118
|
-
"original": "Record<string, any>",
|
|
119
|
-
"resolved": "{ [x: string]: any; }",
|
|
120
|
-
"references": {
|
|
121
|
-
"Record": {
|
|
122
|
-
"location": "global",
|
|
123
|
-
"id": "global::Record"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"required": false,
|
|
128
|
-
"optional": false,
|
|
129
|
-
"docs": {
|
|
130
|
-
"tags": [],
|
|
131
|
-
"text": "Data to be rendered in the chart.\nData field names must match the values you set in xFieldName and yFieldName"
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
"includeLegend": {
|
|
135
|
-
"type": "boolean",
|
|
136
|
-
"mutable": false,
|
|
137
|
-
"complexType": {
|
|
138
|
-
"original": "boolean",
|
|
139
|
-
"resolved": "boolean",
|
|
140
|
-
"references": {}
|
|
141
|
-
},
|
|
142
|
-
"required": false,
|
|
143
|
-
"optional": false,
|
|
144
|
-
"docs": {
|
|
145
|
-
"tags": [],
|
|
146
|
-
"text": ""
|
|
147
|
-
},
|
|
148
|
-
"attribute": "include-legend",
|
|
149
|
-
"reflect": false
|
|
150
|
-
},
|
|
151
|
-
"legendPosition": {
|
|
152
|
-
"type": "string",
|
|
153
|
-
"mutable": false,
|
|
154
|
-
"complexType": {
|
|
155
|
-
"original": "| 'left'\n | 'right'\n | 'top'\n | 'bottom'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n | 'none'",
|
|
156
|
-
"resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"left\" | \"none\" | \"right\" | \"top\" | \"top-left\" | \"top-right\"",
|
|
157
|
-
"references": {}
|
|
158
|
-
},
|
|
159
|
-
"required": false,
|
|
160
|
-
"optional": false,
|
|
161
|
-
"docs": {
|
|
162
|
-
"tags": [],
|
|
163
|
-
"text": ""
|
|
164
|
-
},
|
|
165
|
-
"attribute": "legend-position",
|
|
166
|
-
"reflect": false,
|
|
167
|
-
"defaultValue": "'right'"
|
|
168
|
-
},
|
|
169
|
-
"legendTitle": {
|
|
170
|
-
"type": "string",
|
|
171
|
-
"mutable": false,
|
|
172
|
-
"complexType": {
|
|
173
|
-
"original": "string",
|
|
174
|
-
"resolved": "string",
|
|
175
|
-
"references": {}
|
|
176
|
-
},
|
|
177
|
-
"required": false,
|
|
178
|
-
"optional": false,
|
|
179
|
-
"docs": {
|
|
180
|
-
"tags": [],
|
|
181
|
-
"text": ""
|
|
182
|
-
},
|
|
183
|
-
"attribute": "legend-title",
|
|
184
|
-
"reflect": false
|
|
185
|
-
},
|
|
186
|
-
"colorFieldName": {
|
|
187
|
-
"type": "string",
|
|
188
|
-
"mutable": false,
|
|
189
|
-
"complexType": {
|
|
190
|
-
"original": "string",
|
|
191
|
-
"resolved": "string",
|
|
192
|
-
"references": {}
|
|
193
|
-
},
|
|
194
|
-
"required": false,
|
|
195
|
-
"optional": false,
|
|
196
|
-
"docs": {
|
|
197
|
-
"tags": [],
|
|
198
|
-
"text": ""
|
|
199
|
-
},
|
|
200
|
-
"attribute": "color-field-name",
|
|
201
|
-
"reflect": false
|
|
202
|
-
},
|
|
203
|
-
"outerRadius": {
|
|
204
|
-
"type": "number",
|
|
205
|
-
"mutable": false,
|
|
206
|
-
"complexType": {
|
|
207
|
-
"original": "number",
|
|
208
|
-
"resolved": "number",
|
|
209
|
-
"references": {}
|
|
210
|
-
},
|
|
211
|
-
"required": false,
|
|
212
|
-
"optional": false,
|
|
213
|
-
"docs": {
|
|
214
|
-
"tags": [],
|
|
215
|
-
"text": ""
|
|
216
|
-
},
|
|
217
|
-
"attribute": "outer-radius",
|
|
218
|
-
"reflect": false
|
|
219
|
-
},
|
|
220
|
-
"labelRadius": {
|
|
221
|
-
"type": "number",
|
|
222
|
-
"mutable": false,
|
|
223
|
-
"complexType": {
|
|
224
|
-
"original": "number",
|
|
225
|
-
"resolved": "number",
|
|
226
|
-
"references": {}
|
|
227
|
-
},
|
|
228
|
-
"required": false,
|
|
229
|
-
"optional": false,
|
|
230
|
-
"docs": {
|
|
231
|
-
"tags": [],
|
|
232
|
-
"text": ""
|
|
233
|
-
},
|
|
234
|
-
"attribute": "label-radius",
|
|
235
|
-
"reflect": false
|
|
236
|
-
},
|
|
237
|
-
"labelField": {
|
|
238
|
-
"type": "string",
|
|
239
|
-
"mutable": false,
|
|
240
|
-
"complexType": {
|
|
241
|
-
"original": "string",
|
|
242
|
-
"resolved": "string",
|
|
243
|
-
"references": {}
|
|
244
|
-
},
|
|
245
|
-
"required": false,
|
|
246
|
-
"optional": false,
|
|
247
|
-
"docs": {
|
|
248
|
-
"tags": [],
|
|
249
|
-
"text": ""
|
|
250
|
-
},
|
|
251
|
-
"attribute": "label-field",
|
|
252
|
-
"reflect": false
|
|
253
|
-
},
|
|
254
|
-
"embedOptions": {
|
|
255
|
-
"type": "unknown",
|
|
256
|
-
"mutable": false,
|
|
257
|
-
"complexType": {
|
|
258
|
-
"original": "EmbedOptions",
|
|
259
|
-
"resolved": "EmbedOptions<string, Renderers>",
|
|
260
|
-
"references": {
|
|
261
|
-
"EmbedOptions": {
|
|
262
|
-
"location": "import",
|
|
263
|
-
"path": "vega-embed",
|
|
264
|
-
"id": "../../node_modules/vega-embed/build/vega-embed.module.d.ts::EmbedOptions"
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
"required": false,
|
|
269
|
-
"optional": false,
|
|
270
|
-
"docs": {
|
|
271
|
-
"tags": [],
|
|
272
|
-
"text": ""
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
static get elementRef() { return "root"; }
|
|
278
|
-
static get watchers() {
|
|
279
|
-
return [{
|
|
280
|
-
"propName": "chartData",
|
|
281
|
-
"methodName": "parseData"
|
|
282
|
-
}];
|
|
283
|
-
}
|
|
284
284
|
}
|
|
@@ -3,9 +3,9 @@ import { GuxPieChart } from "../gux-chart-pie";
|
|
|
3
3
|
const components = [GuxPieChart];
|
|
4
4
|
const language = 'en';
|
|
5
5
|
describe('gux-chart-pie-beta', () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
it('should build', async () => {
|
|
7
|
+
const html = '<gux-chart-pie-beta outer-radius="80"></gux-chart-pie-beta>';
|
|
8
|
+
const page = await newSpecPage({ components, html, language });
|
|
9
|
+
expect(page.rootInstance).toBeInstanceOf(GuxPieChart);
|
|
10
|
+
});
|
|
11
11
|
});
|