genesys-spark-chart-components 4.239.0 → 4.243.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/dist/cjs/{color-palette-S2HVs6Hp.js → color-palette-CgQYXGGF.js} +3 -1
- package/dist/cjs/gux-chart-column-beta.cjs.entry.js +5 -7
- package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +4 -8
- package/dist/cjs/gux-chart-line-beta.cjs.entry.js +6 -10
- package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +4 -8
- package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +6 -10
- package/dist/cjs/gux-visualization-beta.cjs.entry.js +14 -5
- package/dist/collection/components/beta/gux-chart-column/gux-chart-column.js +4 -6
- package/dist/collection/components/beta/gux-chart-donut/gux-chart-donut.js +3 -7
- package/dist/collection/components/beta/gux-chart-line/gux-chart-line.js +5 -9
- package/dist/collection/components/beta/gux-chart-pie/gux-chart-pie.js +3 -7
- package/dist/collection/components/beta/gux-chart-scatter-plot/gux-chart-scatter-plot.js +5 -9
- package/dist/collection/components/beta/gux-visualization/gux-visualization.js +3 -1
- package/dist/collection/test/mocks/vega-embed.js +5 -8
- package/dist/collection/test/specTestUtils.js +3 -0
- package/dist/collection/utils/dom/get-closest-element.js +3 -1
- package/dist/collection/utils/tracking/usage.js +2 -0
- package/dist/esm/{color-palette-B6k9i1pj.js → color-palette-rEVcZ9EI.js} +3 -1
- package/dist/esm/gux-chart-column-beta.entry.js +5 -7
- package/dist/esm/gux-chart-donut-beta.entry.js +4 -8
- package/dist/esm/gux-chart-line-beta.entry.js +6 -10
- package/dist/esm/gux-chart-pie-beta.entry.js +4 -8
- package/dist/esm/gux-chart-scatter-plot-beta.entry.js +6 -10
- package/dist/esm/gux-visualization-beta.entry.js +14 -5
- package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
- package/dist/genesys-chart-webcomponents/p-60f68375.entry.js +1 -0
- package/dist/genesys-chart-webcomponents/p-6b47854c.entry.js +1 -0
- package/dist/genesys-chart-webcomponents/p-7b392b22.entry.js +1 -0
- package/dist/genesys-chart-webcomponents/{p-44b4a44b.entry.js → p-a5ae9be7.entry.js} +3 -3
- package/dist/genesys-chart-webcomponents/p-a7b54054.entry.js +1 -0
- package/dist/genesys-chart-webcomponents/p-b26a56a1.entry.js +1 -0
- package/dist/genesys-chart-webcomponents/{p-B6k9i1pj.js → p-rEVcZ9EI.js} +1 -1
- package/dist/stencil-wrapper.js +2 -1
- package/dist/types/test/mocks/vega-embed.d.ts +9 -0
- package/package.json +1 -1
- package/dist/collection/test/axeConfig.js +0 -7
- package/dist/genesys-chart-webcomponents/p-2775336c.entry.js +0 -1
- package/dist/genesys-chart-webcomponents/p-36bc161a.entry.js +0 -1
- package/dist/genesys-chart-webcomponents/p-75a6eed5.entry.js +0 -1
- package/dist/genesys-chart-webcomponents/p-9f657303.entry.js +0 -1
- package/dist/genesys-chart-webcomponents/p-d0f0b07e.entry.js +0 -1
- package/dist/types/test/axeConfig.d.ts +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-YmhHejqr.js';
|
|
2
|
-
import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-
|
|
2
|
+
import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-rEVcZ9EI.js';
|
|
3
3
|
import { l as logError } from './log-error-nsqlWzyl.js';
|
|
4
4
|
|
|
5
5
|
const guxChartDonutCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
|
|
@@ -51,9 +51,7 @@ const GuxDonutChart = class {
|
|
|
51
51
|
if (this.chartData) {
|
|
52
52
|
chartData = { data: this.chartData };
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
56
|
-
}
|
|
54
|
+
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
57
55
|
if (this.includeLegend) {
|
|
58
56
|
this.baseChartSpec.encoding.color.legend = {};
|
|
59
57
|
if (this.legendX || this.legendY) {
|
|
@@ -78,9 +76,7 @@ const GuxDonutChart = class {
|
|
|
78
76
|
this.baseChartSpec.encoding.color.legend = null;
|
|
79
77
|
}
|
|
80
78
|
const colorFieldName = this.colorFieldName || DEFAULT_COLOR_FIELD_NAME;
|
|
81
|
-
|
|
82
|
-
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
83
|
-
}
|
|
79
|
+
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
84
80
|
const legendTitle = this.legendTitle;
|
|
85
81
|
if (legendTitle) {
|
|
86
82
|
this.baseChartSpec.encoding.color.title = legendTitle;
|
|
@@ -196,7 +192,7 @@ const GuxDonutChart = class {
|
|
|
196
192
|
this.parseData();
|
|
197
193
|
}
|
|
198
194
|
render() {
|
|
199
|
-
return (h("gux-visualization-beta", { key: '
|
|
195
|
+
return (h("gux-visualization-beta", { key: '9c6ad7f05c2f788bd677dca62fd91505cba0b525', visualizationSpec: this.visualizationSpec, embedOptions: this.tooltipSpec }));
|
|
200
196
|
}
|
|
201
197
|
get root() { return getElement(this); }
|
|
202
198
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-YmhHejqr.js';
|
|
2
|
-
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-
|
|
2
|
+
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-rEVcZ9EI.js';
|
|
3
3
|
import { l as logError } from './log-error-nsqlWzyl.js';
|
|
4
4
|
|
|
5
5
|
const guxChartLineCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
|
|
@@ -28,8 +28,8 @@ const GuxLineChart = class {
|
|
|
28
28
|
axis: {
|
|
29
29
|
ticks: false,
|
|
30
30
|
titlePadding: 8,
|
|
31
|
-
labelColor:
|
|
32
|
-
domainColor:
|
|
31
|
+
labelColor: DEFAULT_LABEL_COLOR,
|
|
32
|
+
domainColor: DEFAULT_DOMAIN_COLOR
|
|
33
33
|
},
|
|
34
34
|
axisX: {
|
|
35
35
|
labelAngle: 0
|
|
@@ -66,9 +66,7 @@ const GuxLineChart = class {
|
|
|
66
66
|
if (this.includeLegend) {
|
|
67
67
|
this.baseChartSpec.encoding.color.legend = true;
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
71
|
-
}
|
|
69
|
+
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
72
70
|
const xFieldName = this.xFieldName;
|
|
73
71
|
const xAxisTitle = this.xAxisTitle;
|
|
74
72
|
const yFieldName = this.yFieldName;
|
|
@@ -90,9 +88,7 @@ const GuxLineChart = class {
|
|
|
90
88
|
if (yAxisTitle) {
|
|
91
89
|
this.baseChartSpec.encoding.y.title = yAxisTitle;
|
|
92
90
|
}
|
|
93
|
-
|
|
94
|
-
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
95
|
-
}
|
|
91
|
+
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
96
92
|
if (legendTitle) {
|
|
97
93
|
this.baseChartSpec.encoding.color.title = legendTitle;
|
|
98
94
|
}
|
|
@@ -116,7 +112,7 @@ const GuxLineChart = class {
|
|
|
116
112
|
this.parseData();
|
|
117
113
|
}
|
|
118
114
|
render() {
|
|
119
|
-
return (h("gux-visualization-beta", { key: '
|
|
115
|
+
return (h("gux-visualization-beta", { key: '2a94c2f912ccab3d0b1312a81c9aefde8180ccda', visualizationSpec: this.visualizationSpec }));
|
|
120
116
|
}
|
|
121
117
|
get root() { return getElement(this); }
|
|
122
118
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-YmhHejqr.js';
|
|
2
|
-
import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-
|
|
2
|
+
import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-rEVcZ9EI.js';
|
|
3
3
|
import { l as logError } from './log-error-nsqlWzyl.js';
|
|
4
4
|
|
|
5
5
|
const guxChartPieCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
|
|
@@ -53,13 +53,9 @@ const GuxPieChart = class {
|
|
|
53
53
|
if (this.includeLegend) {
|
|
54
54
|
this.baseChartSpec.encoding.color.legend = true;
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
58
|
-
}
|
|
56
|
+
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
59
57
|
const colorFieldName = this.colorFieldName || DEFAULT_COLOR_FIELD_NAME;
|
|
60
|
-
|
|
61
|
-
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
62
|
-
}
|
|
58
|
+
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
63
59
|
const legendTitle = this.legendTitle;
|
|
64
60
|
if (legendTitle) {
|
|
65
61
|
this.baseChartSpec.encoding.color.title = legendTitle;
|
|
@@ -89,7 +85,7 @@ const GuxPieChart = class {
|
|
|
89
85
|
this.parseData();
|
|
90
86
|
}
|
|
91
87
|
render() {
|
|
92
|
-
return (h("gux-visualization-beta", { key: '
|
|
88
|
+
return (h("gux-visualization-beta", { key: 'bda28ea5f2fbd01ee1a91287f2c30446db02d910', visualizationSpec: this.visualizationSpec }));
|
|
93
89
|
}
|
|
94
90
|
get root() { return getElement(this); }
|
|
95
91
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-YmhHejqr.js';
|
|
2
|
-
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-
|
|
2
|
+
import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-rEVcZ9EI.js';
|
|
3
3
|
import { l as logError } from './log-error-nsqlWzyl.js';
|
|
4
4
|
|
|
5
5
|
const guxChartScatterPlotCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
|
|
@@ -30,8 +30,8 @@ const GuxScatterPlotChart = class {
|
|
|
30
30
|
ticks: false,
|
|
31
31
|
titlePadding: 8,
|
|
32
32
|
gridColor: '#F6F7F9',
|
|
33
|
-
labelColor:
|
|
34
|
-
domainColor:
|
|
33
|
+
labelColor: DEFAULT_LABEL_COLOR,
|
|
34
|
+
domainColor: DEFAULT_DOMAIN_COLOR
|
|
35
35
|
},
|
|
36
36
|
axisX: {
|
|
37
37
|
labelAngle: 0,
|
|
@@ -76,9 +76,7 @@ const GuxScatterPlotChart = class {
|
|
|
76
76
|
if (this.xTickLabelSlant) {
|
|
77
77
|
this.baseChartSpec.config.axisX.labelAngle = -45;
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
81
|
-
}
|
|
79
|
+
this.baseChartSpec.config.legend.orient = this.legendPosition;
|
|
82
80
|
const xFieldName = this.xFieldName;
|
|
83
81
|
const xAxisTitle = this.xAxisTitle;
|
|
84
82
|
const yFieldName = this.yFieldName;
|
|
@@ -101,9 +99,7 @@ const GuxScatterPlotChart = class {
|
|
|
101
99
|
if (yAxisTitle) {
|
|
102
100
|
this.baseChartSpec.encoding.y.title = yAxisTitle;
|
|
103
101
|
}
|
|
104
|
-
|
|
105
|
-
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
106
|
-
}
|
|
102
|
+
this.baseChartSpec.encoding.color.field = colorFieldName;
|
|
107
103
|
if (legendTitle) {
|
|
108
104
|
this.baseChartSpec.encoding.color.title = legendTitle;
|
|
109
105
|
}
|
|
@@ -126,7 +122,7 @@ const GuxScatterPlotChart = class {
|
|
|
126
122
|
this.parseData();
|
|
127
123
|
}
|
|
128
124
|
render() {
|
|
129
|
-
return (h("gux-visualization-beta", { key: '
|
|
125
|
+
return (h("gux-visualization-beta", { key: 'b963fc0939b5762c809703d23eb2eec30be2f339', visualizationSpec: this.visualizationSpec }));
|
|
130
126
|
}
|
|
131
127
|
get root() { return getElement(this); }
|
|
132
128
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h as h$1, g as getElement } from './index-YmhHejqr.js';
|
|
2
|
-
import { a as DEFAULT_DOMAIN_COLOR, D as DEFAULT_LABEL_COLOR, t as trackComponent } from './color-palette-
|
|
2
|
+
import { a as DEFAULT_DOMAIN_COLOR, D as DEFAULT_LABEL_COLOR, t as trackComponent } from './color-palette-rEVcZ9EI.js';
|
|
3
3
|
|
|
4
4
|
// Note: This regex matches even invalid JSON strings, but since we’re
|
|
5
5
|
// working on the output of `JSON.stringify` we know that only valid strings
|
|
@@ -68123,7 +68123,9 @@ function browserHasRegionData(localeString) {
|
|
|
68123
68123
|
var _a;
|
|
68124
68124
|
return (browserLocaleOverride(localeString) ||
|
|
68125
68125
|
(localeString.length == 2 &&
|
|
68126
|
-
(
|
|
68126
|
+
(
|
|
68127
|
+
/* istanbul ignore next -- navigator.language is always defined in browser environments */
|
|
68128
|
+
(_a = navigator.language) === null || _a === void 0 ? void 0 : _a.startsWith(`${localeString}-`))));
|
|
68127
68129
|
}
|
|
68128
68130
|
// Currently, login page and web-directory store the English user selection as `en-us`.
|
|
68129
68131
|
// We will remove this override once those apps migrate from using en-us to en as part of a future epic.
|
|
@@ -68137,12 +68139,17 @@ function domLocaleOverride(localeString) {
|
|
|
68137
68139
|
}
|
|
68138
68140
|
function browserLocaleOverride(localeString) {
|
|
68139
68141
|
var _a;
|
|
68142
|
+
/* istanbul ignore next -- navigator.language is always defined in browser environments */
|
|
68140
68143
|
const browserLang = (_a = navigator.language) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
68141
68144
|
switch (localeString.toLowerCase()) {
|
|
68142
68145
|
case 'zh-cn':
|
|
68143
|
-
return Boolean(
|
|
68146
|
+
return Boolean(
|
|
68147
|
+
/* istanbul ignore next -- browserLang null path unreachable when navigator.language is defined */
|
|
68148
|
+
(browserLang === null || browserLang === void 0 ? void 0 : browserLang.startsWith('zh-')) && (browserLang === null || browserLang === void 0 ? void 0 : browserLang.endsWith('-sg')));
|
|
68144
68149
|
case 'zh-tw':
|
|
68145
|
-
return Boolean(
|
|
68150
|
+
return Boolean(
|
|
68151
|
+
/* istanbul ignore next -- browserLang null path unreachable when navigator.language is defined */
|
|
68152
|
+
(browserLang === null || browserLang === void 0 ? void 0 : browserLang.startsWith('zh-')) && (browserLang === null || browserLang === void 0 ? void 0 : browserLang.endsWith('-hk')));
|
|
68146
68153
|
default:
|
|
68147
68154
|
return false;
|
|
68148
68155
|
}
|
|
@@ -68182,6 +68189,7 @@ const GuxVisualization = class {
|
|
|
68182
68189
|
const timeFormatLocale = getLocaleTimeFormats(determineDisplayLocale(this.root));
|
|
68183
68190
|
const patchOption = {
|
|
68184
68191
|
patch: (visSpec) => {
|
|
68192
|
+
/* istanbul ignore next -- patch callback is invoked by vega-embed internals, not directly testable */
|
|
68185
68193
|
if (!(visSpec === null || visSpec === void 0 ? void 0 : visSpec.signals)) {
|
|
68186
68194
|
visSpec.signals = [];
|
|
68187
68195
|
}
|
|
@@ -68203,6 +68211,7 @@ const GuxVisualization = class {
|
|
|
68203
68211
|
// Set aria-label on the SVG if screenreaderDescription is provided
|
|
68204
68212
|
if (this.screenreaderDescription) {
|
|
68205
68213
|
const svgElement = this.chartContainer.querySelector('svg');
|
|
68214
|
+
/* istanbul ignore next -- SVG is always created by vega-embed in practice */
|
|
68206
68215
|
if (svgElement) {
|
|
68207
68216
|
svgElement.setAttribute('aria-label', this.screenreaderDescription);
|
|
68208
68217
|
}
|
|
@@ -68218,7 +68227,7 @@ const GuxVisualization = class {
|
|
|
68218
68227
|
this.chartComponentReady.emit();
|
|
68219
68228
|
}
|
|
68220
68229
|
render() {
|
|
68221
|
-
return (h$1("div", { key: '
|
|
68230
|
+
return (h$1("div", { key: '57a8c09ad064731676885244b71cf7a1f8c7c2a3', class: "gux-chart-container", ref: el => (this.chartContainer = el) }));
|
|
68222
68231
|
}
|
|
68223
68232
|
get root() { return getElement(this); }
|
|
68224
68233
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-YmhHejqr.js";export{s as setNonce}from"./p-YmhHejqr.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l([["p-
|
|
1
|
+
import{p as e,b as l}from"./p-YmhHejqr.js";export{s as setNonce}from"./p-YmhHejqr.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l([["p-a5ae9be7",[[1,"gux-visualization-beta",{visualizationSpec:[16],embedOptions:[16],screenreaderDescription:[1,"screenreader-description"]}]]],["p-a7b54054",[[1,"gux-chart-column-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],xFieldName:[1,"x-field-name"],yFieldName:[1,"y-field-name"],xAxisTitle:[1,"x-axis-title"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],legendPosition:[1,"legend-position"],chartLayers:[16],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-b26a56a1",[[1,"gux-chart-donut-beta",{chartData:[16],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],innerRadius:[2,"inner-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],gauge:[4],centerText:[1,"center-text"],centerSubText:[1,"center-sub-text"],showTooltip:[4,"show-tooltip"],tooltipOptions:[16],legendX:[2,"legend-x"],legendY:[2,"legend-y"],legendFontSize:[2,"legend-font-size"],legendSymbolSize:[2,"legend-symbol-size"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-7b392b22",[[1,"gux-chart-line-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],includeDataPointMarkers:[4,"include-data-point-markers"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],strokeDash:[4,"stroke-dash"],interpolation:[1],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-6b47854c",[[1,"gux-chart-pie-beta",{chartData:[16],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-60f68375",[[1,"gux-chart-scatter-plot-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],useShape:[1,"use-shape"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]]],e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,g as e}from"./p-YmhHejqr.js";import{D as s,a,V as o,t as h}from"./p-rEVcZ9EI.js";import{l}from"./p-nsqlWzyl.js";const n="category",r=class{constructor(i){t(this,i),this.labelColor=s,this.domainColor=a,this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v6.json",params:[{name:"onHover",select:{type:"point",on:"mouseover"}}],config:{axis:{ticks:!1,titlePadding:8,gridColor:"#F6F7F9",labelColor:s,domainColor:a},axisX:{labelAngle:0,grid:!0},legend:{symbolType:"circle"}},width:{step:40},encoding:{x:{type:"nominal"},y:{type:"quantitative"},color:{field:n,type:"nominal",scale:{range:o},legend:null},size:{condition:[{param:"onHover",empty:!1,value:100}],value:40}}},this.legendPosition="right"}parseData(){this.xFieldName&&this.yFieldName||l(this.root,"requires x-field-name and y-field-name");let t={};this.chartData&&(t={data:this.chartData}),this.xTickLabelSlant&&(this.baseChartSpec.config.axisX.labelAngle=-45),this.baseChartSpec.config.legend.orient=this.legendPosition;const i=this.xFieldName,e=this.xAxisTitle,s=this.yFieldName,a=this.yAxisTitle,o=this.legendTitle,h=this.useShape||"circle",r=this.colorFieldName||n;this.includeLegend&&(this.baseChartSpec.encoding.color.legend=!0),i&&(this.baseChartSpec.encoding.x.field=i),e&&(this.baseChartSpec.encoding.x.title=e),s&&(this.baseChartSpec.encoding.y.field=s),a&&(this.baseChartSpec.encoding.y.title=a),this.baseChartSpec.encoding.color.field=r,o&&(this.baseChartSpec.encoding.color.title=o),this.baseChartSpec.mark={type:h,filled:!0},this.baseChartSpec.config.legend.symbolType=h,this.baseChartSpec.encoding.shape={field:r,type:"nominal"},this.baseChartSpec.encoding.tooltip=[{field:i,type:"nominal",title:e},{field:s,type:"quantitative",title:a},{field:r,type:"nominal",title:o}];const c=Object.assign(this.baseChartSpec,t);this.visualizationSpec=c}componentWillLoad(){h(this.root),this.parseData()}render(){return i("gux-visualization-beta",{key:"b963fc0939b5762c809703d23eb2eec30be2f339",visualizationSpec:this.visualizationSpec})}get root(){return e(this)}static get watchers(){return{chartData:[{parseData:0}]}}};r.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{r as gux_chart_scatter_plot_beta}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,g as i}from"./p-YmhHejqr.js";import{V as a,t as s}from"./p-rEVcZ9EI.js";import{l as r}from"./p-nsqlWzyl.js";const o="category",h="value",n=class{constructor(e){t(this,e),this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v6.json",config:{legend:{symbolType:"circle"}},encoding:{theta:{field:"value",type:"quantitative",stack:!0},color:{field:o,type:"nominal",scale:{range:a},legend:null},tooltip:{aggregate:"count",type:"quantitative"}},layer:[{mark:{type:"arc",outerRadius:80}},{mark:{type:"text",radius:90},encoding:{text:{field:h,type:"quantitative"}}}],view:{stroke:null}},this.legendPosition="right"}parseData(){this.outerRadius||r(this.root,"requires outer-radius");let t={};this.chartData&&(t={data:this.chartData}),this.includeLegend&&(this.baseChartSpec.encoding.color.legend=!0),this.baseChartSpec.config.legend.orient=this.legendPosition,this.baseChartSpec.encoding.color.field=this.colorFieldName||o;const e=this.legendTitle;e&&(this.baseChartSpec.encoding.color.title=e),this.baseChartSpec.layer=[{mark:{type:"arc",outerRadius:this.outerRadius}}];const i=this.labelRadius;i&&this.baseChartSpec.layer.push({mark:{type:"text",radius:i},encoding:{text:{field:this.labelField||h,type:"quantitative"}}});const a=Object.assign(this.baseChartSpec,t);this.visualizationSpec=a}componentWillLoad(){s(this.root),this.parseData()}render(){return e("gux-visualization-beta",{key:"bda28ea5f2fbd01ee1a91287f2c30446db02d910",visualizationSpec:this.visualizationSpec})}get root(){return i(this)}static get watchers(){return{chartData:[{parseData:0}]}}};n.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{n as gux_chart_pie_beta}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,g as s}from"./p-YmhHejqr.js";import{D as a,a as e,V as h,t as n}from"./p-rEVcZ9EI.js";import{l as o}from"./p-nsqlWzyl.js";const l="category",r=class{constructor(i){t(this,i),this.labelColor=a,this.domainColor=e,this.baseChartSpec={$schema:"https://vega.github.io/schema/vega-lite/v6.json",mark:{type:"line",interpolate:"linear",point:!1},config:{axis:{ticks:!1,titlePadding:8,labelColor:a,domainColor:e},axisX:{labelAngle:0},legend:{symbolType:"circle"}},encoding:{x:{type:"nominal"},y:{type:"quantitative"},color:{field:l,type:"nominal",scale:{range:h},legend:null},tooltip:{aggregate:"count",type:"quantitative"}}},this.legendPosition="right"}parseData(){this.xFieldName&&this.yFieldName||o(this.root,"requires x-field-name and y-field-name");let t={};this.chartData&&(t={data:this.chartData}),this.xTickLabelSlant&&(this.baseChartSpec.config.axisX.labelAngle=45),this.includeLegend&&(this.baseChartSpec.encoding.color.legend=!0),this.baseChartSpec.config.legend.orient=this.legendPosition;const i=this.xFieldName,s=this.xAxisTitle,a=this.yFieldName,e=this.yAxisTitle,h=this.legendTitle,n=this.colorFieldName||l,r=this.interpolation,c=this.strokeDash,g=this.includeDataPointMarkers;i&&(this.baseChartSpec.encoding.x.field=i),s&&(this.baseChartSpec.encoding.x.title=s),a&&(this.baseChartSpec.encoding.y.field=a),e&&(this.baseChartSpec.encoding.y.title=e),this.baseChartSpec.encoding.color.field=n,h&&(this.baseChartSpec.encoding.color.title=h),c&&(this.baseChartSpec.encoding.strokeDash={field:n,type:"nominal"}),r&&(this.baseChartSpec.mark.interpolate=r),g&&(this.baseChartSpec.mark.point=g);const p=Object.assign(this.baseChartSpec,t);this.visualizationSpec=p}componentWillLoad(){n(this.root),this.parseData()}render(){return i("gux-visualization-beta",{key:"2a94c2f912ccab3d0b1312a81c9aefde8180ccda",visualizationSpec:this.visualizationSpec})}get root(){return s(this)}static get watchers(){return{chartData:[{parseData:0}]}}};r.style="gux-visualization-beta{height:fit-content;color:#2e394c}";export{r as gux_chart_line_beta}
|