genesys-spark-chart-components 4.12.1-beta.1 → 4.29.1-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-c351d7fb.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-6655c04e.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-1bc0cc3a.js +2 -0
- package/dist/genesys-chart-webcomponents/{p-d4a346df.entry.js → p-291b128b.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/p-51f2502a.entry.js +11 -0
- package/dist/genesys-chart-webcomponents/{p-137f5b8f.entry.js → p-64f0b385.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-b5179379.entry.js → p-65020b8a.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-d9928f8c.entry.js → p-83283e73.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/p-e1255160.js +1 -0
- package/dist/genesys-chart-webcomponents/{p-c3aa8578.entry.js → p-e42dd3ba.entry.js} +1 -1
- package/dist/genesys-chart-webcomponents/{p-97c45977.js → p-f6832775.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
|
@@ -5,387 +5,387 @@ import { VISUALIZATION_COLORS } from "../../../utils/theme/color-palette";
|
|
|
5
5
|
import { logError } from "../../../utils/error/log-error";
|
|
6
6
|
const DEFAULT_COLOR_FIELD_NAME = 'category';
|
|
7
7
|
export class GuxLineChart {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
parseData() {
|
|
57
|
-
if (!this.xFieldName || !this.yFieldName) {
|
|
58
|
-
logError(this.root, 'requires x-field-name and y-field-name');
|
|
59
|
-
}
|
|
60
|
-
let chartData = {};
|
|
61
|
-
if (this.chartData) {
|
|
62
|
-
chartData = { data: this.chartData };
|
|
63
|
-
}
|
|
64
|
-
if (this.xTickLabelSlant) {
|
|
65
|
-
this.baseChartSpec.config.axisX.labelAngle = 45;
|
|
66
|
-
}
|
|
67
|
-
if (this.includeLegend) {
|
|
68
|
-
this.baseChartSpec.encoding.color.legend = true;
|
|
69
|
-
}
|
|
70
|
-
if (this.legendPosition) {
|
|
71
|
-
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
72
|
-
}
|
|
73
|
-
const xFieldName = this.xFieldName;
|
|
74
|
-
const xAxisTitle = this.xAxisTitle;
|
|
75
|
-
const yFieldName = this.yFieldName;
|
|
76
|
-
const yAxisTitle = this.yAxisTitle;
|
|
77
|
-
const legendTitle = this.legendTitle;
|
|
78
|
-
const colorFieldName = this.colorFieldName || DEFAULT_COLOR_FIELD_NAME;
|
|
79
|
-
const interpolation = this.interpolation;
|
|
80
|
-
const strokeDash = this.strokeDash;
|
|
81
|
-
const includeDataPointMarkers = this.includeDataPointMarkers;
|
|
82
|
-
if (xFieldName) {
|
|
83
|
-
this.baseChartSpec.encoding.x.field = xFieldName;
|
|
84
|
-
}
|
|
85
|
-
if (xAxisTitle) {
|
|
86
|
-
this.baseChartSpec.encoding.x.title = xAxisTitle;
|
|
8
|
+
constructor() {
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
+
this.baseChartSpec = {
|
|
11
|
+
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
|
|
12
|
+
mark: {
|
|
13
|
+
type: 'line',
|
|
14
|
+
interpolate: 'linear',
|
|
15
|
+
point: false
|
|
16
|
+
},
|
|
17
|
+
config: {
|
|
18
|
+
axis: {
|
|
19
|
+
ticks: false,
|
|
20
|
+
titlePadding: 8
|
|
21
|
+
},
|
|
22
|
+
axisX: {
|
|
23
|
+
labelAngle: 0
|
|
24
|
+
},
|
|
25
|
+
legend: {
|
|
26
|
+
symbolType: 'circle'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
encoding: {
|
|
30
|
+
x: { type: 'nominal' },
|
|
31
|
+
y: { type: 'quantitative' },
|
|
32
|
+
color: {
|
|
33
|
+
field: DEFAULT_COLOR_FIELD_NAME,
|
|
34
|
+
type: 'nominal',
|
|
35
|
+
scale: { range: VISUALIZATION_COLORS },
|
|
36
|
+
legend: null
|
|
37
|
+
},
|
|
38
|
+
tooltip: { aggregate: 'count', type: 'quantitative' }
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
this.chartData = undefined;
|
|
42
|
+
this.xTickLabelSlant = undefined;
|
|
43
|
+
this.includeLegend = undefined;
|
|
44
|
+
this.legendPosition = 'right';
|
|
45
|
+
this.includeDataPointMarkers = undefined;
|
|
46
|
+
this.xFieldName = undefined;
|
|
47
|
+
this.xAxisTitle = undefined;
|
|
48
|
+
this.yFieldName = undefined;
|
|
49
|
+
this.yAxisTitle = undefined;
|
|
50
|
+
this.legendTitle = undefined;
|
|
51
|
+
this.colorFieldName = undefined;
|
|
52
|
+
this.strokeDash = undefined;
|
|
53
|
+
this.interpolation = undefined;
|
|
54
|
+
this.embedOptions = undefined;
|
|
87
55
|
}
|
|
88
|
-
|
|
89
|
-
|
|
56
|
+
parseData() {
|
|
57
|
+
if (!this.xFieldName || !this.yFieldName) {
|
|
58
|
+
logError(this.root, 'requires x-field-name and y-field-name');
|
|
59
|
+
}
|
|
60
|
+
let chartData = {};
|
|
61
|
+
if (this.chartData) {
|
|
62
|
+
chartData = { data: this.chartData };
|
|
63
|
+
}
|
|
64
|
+
if (this.xTickLabelSlant) {
|
|
65
|
+
this.baseChartSpec.config.axisX.labelAngle = 45;
|
|
66
|
+
}
|
|
67
|
+
if (this.includeLegend) {
|
|
68
|
+
this.baseChartSpec.encoding.color.legend = true;
|
|
69
|
+
}
|
|
70
|
+
if (this.legendPosition) {
|
|
71
|
+
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
72
|
+
}
|
|
73
|
+
const xFieldName = this.xFieldName;
|
|
74
|
+
const xAxisTitle = this.xAxisTitle;
|
|
75
|
+
const yFieldName = this.yFieldName;
|
|
76
|
+
const yAxisTitle = this.yAxisTitle;
|
|
77
|
+
const legendTitle = this.legendTitle;
|
|
78
|
+
const colorFieldName = this.colorFieldName || DEFAULT_COLOR_FIELD_NAME;
|
|
79
|
+
const interpolation = this.interpolation;
|
|
80
|
+
const strokeDash = this.strokeDash;
|
|
81
|
+
const includeDataPointMarkers = this.includeDataPointMarkers;
|
|
82
|
+
if (xFieldName) {
|
|
83
|
+
this.baseChartSpec.encoding.x.field = xFieldName;
|
|
84
|
+
}
|
|
85
|
+
if (xAxisTitle) {
|
|
86
|
+
this.baseChartSpec.encoding.x.title = xAxisTitle;
|
|
87
|
+
}
|
|
88
|
+
if (yFieldName) {
|
|
89
|
+
this.baseChartSpec.encoding.y.field = yFieldName;
|
|
90
|
+
}
|
|
91
|
+
if (yAxisTitle) {
|
|
92
|
+
this.baseChartSpec.encoding.y.title = yAxisTitle;
|
|
93
|
+
}
|
|
94
|
+
if (colorFieldName) {
|
|
95
|
+
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
96
|
+
}
|
|
97
|
+
if (legendTitle) {
|
|
98
|
+
this.baseChartSpec.encoding.color.title = legendTitle;
|
|
99
|
+
}
|
|
100
|
+
if (strokeDash) {
|
|
101
|
+
this.baseChartSpec.encoding.strokeDash = {
|
|
102
|
+
field: colorFieldName,
|
|
103
|
+
type: 'nominal'
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (interpolation) {
|
|
107
|
+
this.baseChartSpec.mark.interpolate = interpolation;
|
|
108
|
+
}
|
|
109
|
+
if (includeDataPointMarkers) {
|
|
110
|
+
this.baseChartSpec.mark.point = includeDataPointMarkers;
|
|
111
|
+
}
|
|
112
|
+
const spec = Object.assign(this.baseChartSpec, chartData);
|
|
113
|
+
this.visualizationSpec = spec;
|
|
90
114
|
}
|
|
91
|
-
|
|
92
|
-
|
|
115
|
+
componentWillLoad() {
|
|
116
|
+
trackComponent(this.root);
|
|
117
|
+
this.parseData();
|
|
93
118
|
}
|
|
94
|
-
|
|
95
|
-
|
|
119
|
+
render() {
|
|
120
|
+
return (h("gux-visualization-beta", { key: 'd312d8b365db65c08f3631bb4976e74f7bf077ac', visualizationSpec: this.visualizationSpec }));
|
|
96
121
|
}
|
|
97
|
-
|
|
98
|
-
|
|
122
|
+
static get is() { return "gux-chart-line-beta"; }
|
|
123
|
+
static get encapsulation() { return "shadow"; }
|
|
124
|
+
static get originalStyleUrls() {
|
|
125
|
+
return {
|
|
126
|
+
"$": ["gux-chart-line.scss"]
|
|
127
|
+
};
|
|
99
128
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
};
|
|
129
|
+
static get styleUrls() {
|
|
130
|
+
return {
|
|
131
|
+
"$": ["gux-chart-line.css"]
|
|
132
|
+
};
|
|
105
133
|
}
|
|
106
|
-
|
|
107
|
-
|
|
134
|
+
static get properties() {
|
|
135
|
+
return {
|
|
136
|
+
"chartData": {
|
|
137
|
+
"type": "unknown",
|
|
138
|
+
"mutable": false,
|
|
139
|
+
"complexType": {
|
|
140
|
+
"original": "Record<string, any>",
|
|
141
|
+
"resolved": "{ [x: string]: any; }",
|
|
142
|
+
"references": {
|
|
143
|
+
"Record": {
|
|
144
|
+
"location": "global",
|
|
145
|
+
"id": "global::Record"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": false,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "Data to be rendered in the chart.\nData field names must match the values you set in xFieldName and yFieldName"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"xTickLabelSlant": {
|
|
157
|
+
"type": "boolean",
|
|
158
|
+
"mutable": false,
|
|
159
|
+
"complexType": {
|
|
160
|
+
"original": "boolean",
|
|
161
|
+
"resolved": "boolean",
|
|
162
|
+
"references": {}
|
|
163
|
+
},
|
|
164
|
+
"required": false,
|
|
165
|
+
"optional": false,
|
|
166
|
+
"docs": {
|
|
167
|
+
"tags": [],
|
|
168
|
+
"text": "If true, then make Axis tick label 45 degrees"
|
|
169
|
+
},
|
|
170
|
+
"attribute": "x-tick-label-slant",
|
|
171
|
+
"reflect": false
|
|
172
|
+
},
|
|
173
|
+
"includeLegend": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"mutable": false,
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "boolean",
|
|
178
|
+
"resolved": "boolean",
|
|
179
|
+
"references": {}
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"optional": false,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": ""
|
|
186
|
+
},
|
|
187
|
+
"attribute": "include-legend",
|
|
188
|
+
"reflect": false
|
|
189
|
+
},
|
|
190
|
+
"legendPosition": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "| 'left'\n | 'right'\n | 'top'\n | 'bottom'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n | 'none'",
|
|
195
|
+
"resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"left\" | \"none\" | \"right\" | \"top\" | \"top-left\" | \"top-right\"",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": false,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": ""
|
|
203
|
+
},
|
|
204
|
+
"attribute": "legend-position",
|
|
205
|
+
"reflect": false,
|
|
206
|
+
"defaultValue": "'right'"
|
|
207
|
+
},
|
|
208
|
+
"includeDataPointMarkers": {
|
|
209
|
+
"type": "boolean",
|
|
210
|
+
"mutable": false,
|
|
211
|
+
"complexType": {
|
|
212
|
+
"original": "boolean",
|
|
213
|
+
"resolved": "boolean",
|
|
214
|
+
"references": {}
|
|
215
|
+
},
|
|
216
|
+
"required": false,
|
|
217
|
+
"optional": false,
|
|
218
|
+
"docs": {
|
|
219
|
+
"tags": [],
|
|
220
|
+
"text": ""
|
|
221
|
+
},
|
|
222
|
+
"attribute": "include-data-point-markers",
|
|
223
|
+
"reflect": false
|
|
224
|
+
},
|
|
225
|
+
"xFieldName": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "string",
|
|
230
|
+
"resolved": "string",
|
|
231
|
+
"references": {}
|
|
232
|
+
},
|
|
233
|
+
"required": false,
|
|
234
|
+
"optional": false,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Name for the data field to use to populate the chart's x-axis\ne.g. xFieldName of \"category\" will map any \"category\" fields in chartData to the x-axis"
|
|
238
|
+
},
|
|
239
|
+
"attribute": "x-field-name",
|
|
240
|
+
"reflect": false
|
|
241
|
+
},
|
|
242
|
+
"xAxisTitle": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "string",
|
|
247
|
+
"resolved": "string",
|
|
248
|
+
"references": {}
|
|
249
|
+
},
|
|
250
|
+
"required": false,
|
|
251
|
+
"optional": false,
|
|
252
|
+
"docs": {
|
|
253
|
+
"tags": [],
|
|
254
|
+
"text": "Title to display along the x-axis"
|
|
255
|
+
},
|
|
256
|
+
"attribute": "x-axis-title",
|
|
257
|
+
"reflect": false
|
|
258
|
+
},
|
|
259
|
+
"yFieldName": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"mutable": false,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "string",
|
|
264
|
+
"resolved": "string",
|
|
265
|
+
"references": {}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": false,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [],
|
|
271
|
+
"text": "Name for the data field to use to populate the chart's x-axis\ne.g. yFieldName of \"value\" will map any \"value\" fields in chartData to the y-axis"
|
|
272
|
+
},
|
|
273
|
+
"attribute": "y-field-name",
|
|
274
|
+
"reflect": false
|
|
275
|
+
},
|
|
276
|
+
"yAxisTitle": {
|
|
277
|
+
"type": "string",
|
|
278
|
+
"mutable": false,
|
|
279
|
+
"complexType": {
|
|
280
|
+
"original": "string",
|
|
281
|
+
"resolved": "string",
|
|
282
|
+
"references": {}
|
|
283
|
+
},
|
|
284
|
+
"required": false,
|
|
285
|
+
"optional": false,
|
|
286
|
+
"docs": {
|
|
287
|
+
"tags": [],
|
|
288
|
+
"text": "Title to display along the y-axis"
|
|
289
|
+
},
|
|
290
|
+
"attribute": "y-axis-title",
|
|
291
|
+
"reflect": false
|
|
292
|
+
},
|
|
293
|
+
"legendTitle": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"mutable": false,
|
|
296
|
+
"complexType": {
|
|
297
|
+
"original": "string",
|
|
298
|
+
"resolved": "string",
|
|
299
|
+
"references": {}
|
|
300
|
+
},
|
|
301
|
+
"required": false,
|
|
302
|
+
"optional": false,
|
|
303
|
+
"docs": {
|
|
304
|
+
"tags": [],
|
|
305
|
+
"text": "Title to display above the optional legend"
|
|
306
|
+
},
|
|
307
|
+
"attribute": "legend-title",
|
|
308
|
+
"reflect": false
|
|
309
|
+
},
|
|
310
|
+
"colorFieldName": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"mutable": false,
|
|
313
|
+
"complexType": {
|
|
314
|
+
"original": "string",
|
|
315
|
+
"resolved": "string",
|
|
316
|
+
"references": {}
|
|
317
|
+
},
|
|
318
|
+
"required": false,
|
|
319
|
+
"optional": false,
|
|
320
|
+
"docs": {
|
|
321
|
+
"tags": [],
|
|
322
|
+
"text": ""
|
|
323
|
+
},
|
|
324
|
+
"attribute": "color-field-name",
|
|
325
|
+
"reflect": false
|
|
326
|
+
},
|
|
327
|
+
"strokeDash": {
|
|
328
|
+
"type": "boolean",
|
|
329
|
+
"mutable": false,
|
|
330
|
+
"complexType": {
|
|
331
|
+
"original": "boolean",
|
|
332
|
+
"resolved": "boolean",
|
|
333
|
+
"references": {}
|
|
334
|
+
},
|
|
335
|
+
"required": false,
|
|
336
|
+
"optional": false,
|
|
337
|
+
"docs": {
|
|
338
|
+
"tags": [],
|
|
339
|
+
"text": ""
|
|
340
|
+
},
|
|
341
|
+
"attribute": "stroke-dash",
|
|
342
|
+
"reflect": false
|
|
343
|
+
},
|
|
344
|
+
"interpolation": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"mutable": false,
|
|
347
|
+
"complexType": {
|
|
348
|
+
"original": "string",
|
|
349
|
+
"resolved": "string",
|
|
350
|
+
"references": {}
|
|
351
|
+
},
|
|
352
|
+
"required": false,
|
|
353
|
+
"optional": false,
|
|
354
|
+
"docs": {
|
|
355
|
+
"tags": [],
|
|
356
|
+
"text": ""
|
|
357
|
+
},
|
|
358
|
+
"attribute": "interpolation",
|
|
359
|
+
"reflect": false
|
|
360
|
+
},
|
|
361
|
+
"embedOptions": {
|
|
362
|
+
"type": "unknown",
|
|
363
|
+
"mutable": false,
|
|
364
|
+
"complexType": {
|
|
365
|
+
"original": "EmbedOptions",
|
|
366
|
+
"resolved": "EmbedOptions<string, Renderers>",
|
|
367
|
+
"references": {
|
|
368
|
+
"EmbedOptions": {
|
|
369
|
+
"location": "import",
|
|
370
|
+
"path": "vega-embed",
|
|
371
|
+
"id": "../../node_modules/vega-embed/build/vega-embed.module.d.ts::EmbedOptions"
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"required": false,
|
|
376
|
+
"optional": false,
|
|
377
|
+
"docs": {
|
|
378
|
+
"tags": [],
|
|
379
|
+
"text": ""
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
};
|
|
108
383
|
}
|
|
109
|
-
|
|
110
|
-
|
|
384
|
+
static get elementRef() { return "root"; }
|
|
385
|
+
static get watchers() {
|
|
386
|
+
return [{
|
|
387
|
+
"propName": "chartData",
|
|
388
|
+
"methodName": "parseData"
|
|
389
|
+
}];
|
|
111
390
|
}
|
|
112
|
-
const spec = Object.assign(this.baseChartSpec, chartData);
|
|
113
|
-
this.visualizationSpec = spec;
|
|
114
|
-
}
|
|
115
|
-
componentWillLoad() {
|
|
116
|
-
trackComponent(this.root);
|
|
117
|
-
this.parseData();
|
|
118
|
-
}
|
|
119
|
-
render() {
|
|
120
|
-
return (h("gux-visualization-beta", { visualizationSpec: this.visualizationSpec }));
|
|
121
|
-
}
|
|
122
|
-
static get is() { return "gux-chart-line-beta"; }
|
|
123
|
-
static get encapsulation() { return "shadow"; }
|
|
124
|
-
static get originalStyleUrls() {
|
|
125
|
-
return {
|
|
126
|
-
"$": ["gux-chart-line.scss"]
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
static get styleUrls() {
|
|
130
|
-
return {
|
|
131
|
-
"$": ["gux-chart-line.css"]
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
static get properties() {
|
|
135
|
-
return {
|
|
136
|
-
"chartData": {
|
|
137
|
-
"type": "unknown",
|
|
138
|
-
"mutable": false,
|
|
139
|
-
"complexType": {
|
|
140
|
-
"original": "Record<string, any>",
|
|
141
|
-
"resolved": "{ [x: string]: any; }",
|
|
142
|
-
"references": {
|
|
143
|
-
"Record": {
|
|
144
|
-
"location": "global",
|
|
145
|
-
"id": "global::Record"
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
"required": false,
|
|
150
|
-
"optional": false,
|
|
151
|
-
"docs": {
|
|
152
|
-
"tags": [],
|
|
153
|
-
"text": "Data to be rendered in the chart.\nData field names must match the values you set in xFieldName and yFieldName"
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
"xTickLabelSlant": {
|
|
157
|
-
"type": "boolean",
|
|
158
|
-
"mutable": false,
|
|
159
|
-
"complexType": {
|
|
160
|
-
"original": "boolean",
|
|
161
|
-
"resolved": "boolean",
|
|
162
|
-
"references": {}
|
|
163
|
-
},
|
|
164
|
-
"required": false,
|
|
165
|
-
"optional": false,
|
|
166
|
-
"docs": {
|
|
167
|
-
"tags": [],
|
|
168
|
-
"text": "If true, then make Axis tick label 45 degrees"
|
|
169
|
-
},
|
|
170
|
-
"attribute": "x-tick-label-slant",
|
|
171
|
-
"reflect": false
|
|
172
|
-
},
|
|
173
|
-
"includeLegend": {
|
|
174
|
-
"type": "boolean",
|
|
175
|
-
"mutable": false,
|
|
176
|
-
"complexType": {
|
|
177
|
-
"original": "boolean",
|
|
178
|
-
"resolved": "boolean",
|
|
179
|
-
"references": {}
|
|
180
|
-
},
|
|
181
|
-
"required": false,
|
|
182
|
-
"optional": false,
|
|
183
|
-
"docs": {
|
|
184
|
-
"tags": [],
|
|
185
|
-
"text": ""
|
|
186
|
-
},
|
|
187
|
-
"attribute": "include-legend",
|
|
188
|
-
"reflect": false
|
|
189
|
-
},
|
|
190
|
-
"legendPosition": {
|
|
191
|
-
"type": "string",
|
|
192
|
-
"mutable": false,
|
|
193
|
-
"complexType": {
|
|
194
|
-
"original": "| 'left'\n | 'right'\n | 'top'\n | 'bottom'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n | 'none'",
|
|
195
|
-
"resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"left\" | \"none\" | \"right\" | \"top\" | \"top-left\" | \"top-right\"",
|
|
196
|
-
"references": {}
|
|
197
|
-
},
|
|
198
|
-
"required": false,
|
|
199
|
-
"optional": false,
|
|
200
|
-
"docs": {
|
|
201
|
-
"tags": [],
|
|
202
|
-
"text": ""
|
|
203
|
-
},
|
|
204
|
-
"attribute": "legend-position",
|
|
205
|
-
"reflect": false,
|
|
206
|
-
"defaultValue": "'right'"
|
|
207
|
-
},
|
|
208
|
-
"includeDataPointMarkers": {
|
|
209
|
-
"type": "boolean",
|
|
210
|
-
"mutable": false,
|
|
211
|
-
"complexType": {
|
|
212
|
-
"original": "boolean",
|
|
213
|
-
"resolved": "boolean",
|
|
214
|
-
"references": {}
|
|
215
|
-
},
|
|
216
|
-
"required": false,
|
|
217
|
-
"optional": false,
|
|
218
|
-
"docs": {
|
|
219
|
-
"tags": [],
|
|
220
|
-
"text": ""
|
|
221
|
-
},
|
|
222
|
-
"attribute": "include-data-point-markers",
|
|
223
|
-
"reflect": false
|
|
224
|
-
},
|
|
225
|
-
"xFieldName": {
|
|
226
|
-
"type": "string",
|
|
227
|
-
"mutable": false,
|
|
228
|
-
"complexType": {
|
|
229
|
-
"original": "string",
|
|
230
|
-
"resolved": "string",
|
|
231
|
-
"references": {}
|
|
232
|
-
},
|
|
233
|
-
"required": false,
|
|
234
|
-
"optional": false,
|
|
235
|
-
"docs": {
|
|
236
|
-
"tags": [],
|
|
237
|
-
"text": "Name for the data field to use to populate the chart's x-axis\ne.g. xFieldName of \"category\" will map any \"category\" fields in chartData to the x-axis"
|
|
238
|
-
},
|
|
239
|
-
"attribute": "x-field-name",
|
|
240
|
-
"reflect": false
|
|
241
|
-
},
|
|
242
|
-
"xAxisTitle": {
|
|
243
|
-
"type": "string",
|
|
244
|
-
"mutable": false,
|
|
245
|
-
"complexType": {
|
|
246
|
-
"original": "string",
|
|
247
|
-
"resolved": "string",
|
|
248
|
-
"references": {}
|
|
249
|
-
},
|
|
250
|
-
"required": false,
|
|
251
|
-
"optional": false,
|
|
252
|
-
"docs": {
|
|
253
|
-
"tags": [],
|
|
254
|
-
"text": "Title to display along the x-axis"
|
|
255
|
-
},
|
|
256
|
-
"attribute": "x-axis-title",
|
|
257
|
-
"reflect": false
|
|
258
|
-
},
|
|
259
|
-
"yFieldName": {
|
|
260
|
-
"type": "string",
|
|
261
|
-
"mutable": false,
|
|
262
|
-
"complexType": {
|
|
263
|
-
"original": "string",
|
|
264
|
-
"resolved": "string",
|
|
265
|
-
"references": {}
|
|
266
|
-
},
|
|
267
|
-
"required": false,
|
|
268
|
-
"optional": false,
|
|
269
|
-
"docs": {
|
|
270
|
-
"tags": [],
|
|
271
|
-
"text": "Name for the data field to use to populate the chart's x-axis\ne.g. yFieldName of \"value\" will map any \"value\" fields in chartData to the y-axis"
|
|
272
|
-
},
|
|
273
|
-
"attribute": "y-field-name",
|
|
274
|
-
"reflect": false
|
|
275
|
-
},
|
|
276
|
-
"yAxisTitle": {
|
|
277
|
-
"type": "string",
|
|
278
|
-
"mutable": false,
|
|
279
|
-
"complexType": {
|
|
280
|
-
"original": "string",
|
|
281
|
-
"resolved": "string",
|
|
282
|
-
"references": {}
|
|
283
|
-
},
|
|
284
|
-
"required": false,
|
|
285
|
-
"optional": false,
|
|
286
|
-
"docs": {
|
|
287
|
-
"tags": [],
|
|
288
|
-
"text": "Title to display along the y-axis"
|
|
289
|
-
},
|
|
290
|
-
"attribute": "y-axis-title",
|
|
291
|
-
"reflect": false
|
|
292
|
-
},
|
|
293
|
-
"legendTitle": {
|
|
294
|
-
"type": "string",
|
|
295
|
-
"mutable": false,
|
|
296
|
-
"complexType": {
|
|
297
|
-
"original": "string",
|
|
298
|
-
"resolved": "string",
|
|
299
|
-
"references": {}
|
|
300
|
-
},
|
|
301
|
-
"required": false,
|
|
302
|
-
"optional": false,
|
|
303
|
-
"docs": {
|
|
304
|
-
"tags": [],
|
|
305
|
-
"text": "Title to display above the optional legend"
|
|
306
|
-
},
|
|
307
|
-
"attribute": "legend-title",
|
|
308
|
-
"reflect": false
|
|
309
|
-
},
|
|
310
|
-
"colorFieldName": {
|
|
311
|
-
"type": "string",
|
|
312
|
-
"mutable": false,
|
|
313
|
-
"complexType": {
|
|
314
|
-
"original": "string",
|
|
315
|
-
"resolved": "string",
|
|
316
|
-
"references": {}
|
|
317
|
-
},
|
|
318
|
-
"required": false,
|
|
319
|
-
"optional": false,
|
|
320
|
-
"docs": {
|
|
321
|
-
"tags": [],
|
|
322
|
-
"text": ""
|
|
323
|
-
},
|
|
324
|
-
"attribute": "color-field-name",
|
|
325
|
-
"reflect": false
|
|
326
|
-
},
|
|
327
|
-
"strokeDash": {
|
|
328
|
-
"type": "boolean",
|
|
329
|
-
"mutable": false,
|
|
330
|
-
"complexType": {
|
|
331
|
-
"original": "boolean",
|
|
332
|
-
"resolved": "boolean",
|
|
333
|
-
"references": {}
|
|
334
|
-
},
|
|
335
|
-
"required": false,
|
|
336
|
-
"optional": false,
|
|
337
|
-
"docs": {
|
|
338
|
-
"tags": [],
|
|
339
|
-
"text": ""
|
|
340
|
-
},
|
|
341
|
-
"attribute": "stroke-dash",
|
|
342
|
-
"reflect": false
|
|
343
|
-
},
|
|
344
|
-
"interpolation": {
|
|
345
|
-
"type": "string",
|
|
346
|
-
"mutable": false,
|
|
347
|
-
"complexType": {
|
|
348
|
-
"original": "string",
|
|
349
|
-
"resolved": "string",
|
|
350
|
-
"references": {}
|
|
351
|
-
},
|
|
352
|
-
"required": false,
|
|
353
|
-
"optional": false,
|
|
354
|
-
"docs": {
|
|
355
|
-
"tags": [],
|
|
356
|
-
"text": ""
|
|
357
|
-
},
|
|
358
|
-
"attribute": "interpolation",
|
|
359
|
-
"reflect": false
|
|
360
|
-
},
|
|
361
|
-
"embedOptions": {
|
|
362
|
-
"type": "unknown",
|
|
363
|
-
"mutable": false,
|
|
364
|
-
"complexType": {
|
|
365
|
-
"original": "EmbedOptions",
|
|
366
|
-
"resolved": "EmbedOptions<string, Renderers>",
|
|
367
|
-
"references": {
|
|
368
|
-
"EmbedOptions": {
|
|
369
|
-
"location": "import",
|
|
370
|
-
"path": "vega-embed",
|
|
371
|
-
"id": "../../node_modules/vega-embed/build/vega-embed.module.d.ts::EmbedOptions"
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
"required": false,
|
|
376
|
-
"optional": false,
|
|
377
|
-
"docs": {
|
|
378
|
-
"tags": [],
|
|
379
|
-
"text": ""
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
static get elementRef() { return "root"; }
|
|
385
|
-
static get watchers() {
|
|
386
|
-
return [{
|
|
387
|
-
"propName": "chartData",
|
|
388
|
-
"methodName": "parseData"
|
|
389
|
-
}];
|
|
390
|
-
}
|
|
391
391
|
}
|