@sme.up/ketchup 5.0.0 → 5.1.1
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/README.md +1 -1
- package/dist/cjs/{cell-utils-720be0c8.js → cell-utils-5b16c180.js} +4 -4
- package/dist/cjs/{f-button-dbf3cd3a.js → f-button-3b9f32af.js} +2 -2
- package/dist/cjs/{f-cell-93d984ad.js → f-cell-c6ad973a.js} +6 -6
- package/dist/cjs/{f-chip-438213eb.js → f-chip-bed86c4a.js} +3 -3
- package/dist/cjs/{f-image-21865ab7.js → f-image-08a3d340.js} +2 -2
- package/dist/cjs/{index-ab119fad.js → index-8d7bb3be.js} +4 -1
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -5
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +412 -353
- package/dist/cjs/kup-calendar.cjs.entry.js +8 -8
- package/dist/cjs/kup-cell.cjs.entry.js +8 -8
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash_2.cjs.entry.js +5 -5
- package/dist/cjs/kup-drawer.cjs.entry.js +8 -5
- package/dist/cjs/kup-echart.cjs.entry.js +210 -60
- package/dist/cjs/kup-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -4
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
- package/dist/cjs/kup-magic-box.cjs.entry.js +7 -7
- package/dist/cjs/{kup-manager-09c0c1fc.js → kup-manager-4227f0a2.js} +2804 -2598
- package/dist/cjs/kup-nav-bar.cjs.entry.js +6 -6
- package/dist/cjs/kup-photo-frame.cjs.entry.js +179 -0
- package/dist/cjs/kup-probe.cjs.entry.js +3 -3
- package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
- package/dist/cjs/kup-snackbar.cjs.entry.js +7 -7
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-a60ab5fa.js → utils-b9df398c.js} +4 -38
- package/dist/collection/assets/card.js +30 -30
- package/dist/collection/assets/data-table.js +24 -30
- package/dist/collection/assets/echart.js +481 -0
- package/dist/collection/assets/index.js +79 -79
- package/dist/collection/assets/kupdata.js +29 -41
- package/dist/collection/assets/list.js +6 -6
- package/dist/collection/assets/nav-bar.js +4 -4
- package/dist/collection/assets/probe.js +18 -18
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +5 -5
- package/dist/collection/components/kup-box/kup-box.js +9 -9
- package/dist/collection/components/kup-button-list/kup-button-list.js +4 -4
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +1 -1
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +21 -22
- package/dist/collection/components/kup-card/kup-card.js +1 -2
- package/dist/collection/components/kup-chip/kup-chip.js +4 -4
- package/dist/collection/components/kup-combobox/kup-combobox.js +6 -6
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +0 -2
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +31 -32
- package/dist/collection/components/kup-data-table/kup-data-table.js +124 -164
- package/dist/collection/components/kup-drawer/kup-drawer.js +4 -1
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +3 -3
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +14 -14
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +3 -0
- package/dist/collection/components/kup-echart/kup-echart.js +246 -58
- package/dist/collection/components/kup-image/assets/svg/instagram.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/pinterest.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/reddit.svg +1 -0
- package/dist/collection/components/kup-list/kup-list-helper.js +26 -26
- package/dist/collection/components/kup-list/kup-list.css +35 -3
- package/dist/collection/components/kup-list/kup-list.js +52 -44
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +2 -2
- package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +10 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +70 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +382 -0
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +1 -1
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +10 -10
- package/dist/collection/components/kup-tree/kup-tree.js +100 -51
- package/dist/collection/f-components/f-paginator/f-paginator.js +6 -6
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +2 -2
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +27 -3
- package/dist/collection/managers/kup-data/kup-data-declarations.js +2 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +2 -2
- package/dist/collection/managers/kup-data/kup-data.js +337 -155
- package/dist/collection/managers/kup-dates/kup-dates.js +2 -2
- package/dist/collection/managers/kup-debug/kup-debug.js +6 -6
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +1 -1
- package/dist/collection/managers/kup-language/kup-language.js +2 -2
- package/dist/collection/managers/kup-manager/kup-manager.js +13 -0
- package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -0
- package/dist/collection/managers/kup-math/kup-math-helper.js +39 -0
- package/dist/collection/managers/kup-math/kup-math.js +151 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +48 -1
- package/dist/collection/managers/kup-theme/kup-theme.js +2 -2
- package/dist/collection/utils/cell-utils.js +2 -3
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/collection/utils/utils.js +3 -74
- package/dist/esm/{cell-utils-b80ccb8c.js → cell-utils-69f75e2e.js} +4 -4
- package/dist/esm/{f-button-9e835467.js → f-button-7e7607d8.js} +2 -2
- package/dist/esm/{f-cell-f8bb2e04.js → f-cell-e4d83c27.js} +6 -6
- package/dist/esm/{f-chip-953c6915.js → f-chip-51dfefaf.js} +3 -3
- package/dist/esm/{f-image-78c5265e.js → f-image-de331954.js} +2 -2
- package/dist/esm/{index-78f3699d.js → index-aeec9835.js} +4 -1
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +5 -5
- package/dist/esm/kup-autocomplete_27.entry.js +412 -353
- package/dist/esm/kup-calendar.entry.js +8 -8
- package/dist/esm/kup-cell.entry.js +8 -8
- package/dist/esm/kup-dash-list.entry.js +5 -5
- package/dist/esm/kup-dash_2.entry.js +5 -5
- package/dist/esm/kup-drawer.entry.js +8 -5
- package/dist/esm/kup-echart.entry.js +210 -60
- package/dist/esm/kup-field.entry.js +3 -3
- package/dist/esm/kup-iframe.entry.js +4 -4
- package/dist/esm/kup-lazy.entry.js +4 -4
- package/dist/esm/kup-magic-box.entry.js +7 -7
- package/dist/esm/{kup-manager-bba62291.js → kup-manager-0ab94726.js} +2805 -2598
- package/dist/esm/kup-nav-bar.entry.js +6 -6
- package/dist/esm/kup-photo-frame.entry.js +175 -0
- package/dist/esm/kup-probe.entry.js +3 -3
- package/dist/esm/kup-qlik.entry.js +3 -3
- package/dist/esm/kup-snackbar.entry.js +7 -7
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d1569956.js → utils-35c7a90d.js} +5 -37
- package/dist/ketchup/assets/svg/instagram.svg +1 -0
- package/dist/ketchup/assets/svg/pinterest.svg +1 -0
- package/dist/ketchup/assets/svg/reddit.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-0751aaf6.entry.js +1 -0
- package/dist/ketchup/p-10c8d755.js +1 -0
- package/dist/ketchup/{p-aa27f9f7.entry.js → p-24df4f29.entry.js} +2 -2
- package/dist/ketchup/{p-29800a2e.js → p-2d4f19f4.js} +1 -1
- package/dist/ketchup/p-33073f4a.js +1 -0
- package/dist/ketchup/p-3445be1e.entry.js +1 -0
- package/dist/ketchup/p-3813281b.entry.js +1 -0
- package/dist/ketchup/p-4081f5f7.entry.js +1 -0
- package/dist/ketchup/p-47b57d97.js +1 -0
- package/dist/ketchup/p-5186885c.entry.js +1 -0
- package/dist/ketchup/{p-f993f813.js → p-5d190cf5.js} +1 -1
- package/dist/ketchup/p-67c64257.entry.js +1 -0
- package/dist/ketchup/p-68fc1428.entry.js +1 -0
- package/dist/ketchup/p-8be1337b.js +1 -0
- package/dist/ketchup/p-8f735633.entry.js +1 -0
- package/dist/ketchup/p-96101f09.entry.js +39 -0
- package/dist/ketchup/p-9bcda66f.entry.js +1 -0
- package/dist/ketchup/p-b5e1dbfa.entry.js +1 -0
- package/dist/ketchup/{p-ebf4cf56.js → p-c314b1e6.js} +1 -1
- package/dist/ketchup/p-d7af8156.entry.js +1 -0
- package/dist/ketchup/p-dbe87a3f.entry.js +143 -0
- package/dist/ketchup/p-ee33cbe9.js +9 -0
- package/dist/ketchup/p-f250d42b.entry.js +1 -0
- package/dist/ketchup/p-f9c41e20.entry.js +1 -0
- package/dist/ketchup/p-fea316ab.entry.js +1 -0
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +2 -1
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +0 -2
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +8 -15
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -1
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +3 -0
- package/dist/types/components/kup-echart/kup-echart.d.ts +12 -1
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +3 -7
- package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
- package/dist/types/components/kup-list/kup-list.d.ts +2 -2
- package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +9 -0
- package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -0
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -1
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -1
- package/dist/types/components.d.ts +110 -28
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +9 -1
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +4 -25
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +1 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +63 -27
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +11 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +2 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +21 -0
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +60 -0
- package/dist/types/managers/kup-objects/kup-objects.d.ts +22 -0
- package/dist/types/utils/utils.d.ts +0 -18
- package/package.json +2 -2
- package/dist/collection/managers/kup-data/kup-data-dataset-helper.js +0 -262
- package/dist/collection/managers/kup-data/kup-data-helper.js +0 -61
- package/dist/collection/utils/state-utils.js +0 -9
- package/dist/ketchup/p-0032a782.entry.js +0 -1
- package/dist/ketchup/p-18c4d083.entry.js +0 -1
- package/dist/ketchup/p-199c972e.entry.js +0 -1
- package/dist/ketchup/p-34aa8d8a.entry.js +0 -1
- package/dist/ketchup/p-542279e9.entry.js +0 -1
- package/dist/ketchup/p-5b26a7a8.entry.js +0 -39
- package/dist/ketchup/p-5c97e7ab.js +0 -1
- package/dist/ketchup/p-6817ca85.entry.js +0 -1
- package/dist/ketchup/p-76e674ca.entry.js +0 -1
- package/dist/ketchup/p-78aa6f1b.js +0 -1
- package/dist/ketchup/p-842b66aa.entry.js +0 -1
- package/dist/ketchup/p-894981c0.entry.js +0 -143
- package/dist/ketchup/p-8ac2fa75.entry.js +0 -1
- package/dist/ketchup/p-907c9e11.entry.js +0 -1
- package/dist/ketchup/p-9ae9149b.entry.js +0 -1
- package/dist/ketchup/p-b0d1bdd8.js +0 -9
- package/dist/ketchup/p-e1e4c951.entry.js +0 -1
- package/dist/ketchup/p-eba369d9.entry.js +0 -1
- package/dist/ketchup/p-ed0b8666.js +0 -1
- package/dist/ketchup/p-fa540f82.js +0 -1
- package/dist/types/managers/kup-data/kup-data-dataset-helper.d.ts +0 -42
- package/dist/types/managers/kup-data/kup-data-helper.d.ts +0 -11
- package/dist/types/utils/state-utils.d.ts +0 -1
|
@@ -13,7 +13,7 @@ export class KupDropdownButton {
|
|
|
13
13
|
/*-------------------------------------------------*/
|
|
14
14
|
/* S t a t e s */
|
|
15
15
|
/*-------------------------------------------------*/
|
|
16
|
-
this.
|
|
16
|
+
this.id = '';
|
|
17
17
|
/*-------------------------------------------------*/
|
|
18
18
|
/* P r o p s */
|
|
19
19
|
/*-------------------------------------------------*/
|
|
@@ -147,7 +147,7 @@ export class KupDropdownButton {
|
|
|
147
147
|
this.kupBlur.emit({
|
|
148
148
|
comp: this,
|
|
149
149
|
id: this.rootElement.id,
|
|
150
|
-
value: this.
|
|
150
|
+
value: this.id,
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
onKupClick() {
|
|
@@ -155,14 +155,14 @@ export class KupDropdownButton {
|
|
|
155
155
|
this.kupClick.emit({
|
|
156
156
|
comp: this,
|
|
157
157
|
id: this.rootElement.id,
|
|
158
|
-
value: this.
|
|
158
|
+
value: this.id,
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
onKupFocus() {
|
|
162
162
|
this.kupFocus.emit({
|
|
163
163
|
comp: this,
|
|
164
164
|
id: this.rootElement.id,
|
|
165
|
-
value: this.
|
|
165
|
+
value: this.id,
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
onDropDownClick() {
|
|
@@ -179,12 +179,12 @@ export class KupDropdownButton {
|
|
|
179
179
|
this.kupChange.emit({
|
|
180
180
|
comp: this,
|
|
181
181
|
id: this.rootElement.id,
|
|
182
|
-
value: this.
|
|
182
|
+
value: this.id,
|
|
183
183
|
});
|
|
184
184
|
this.kupItemClick.emit({
|
|
185
185
|
comp: this,
|
|
186
186
|
id: this.rootElement.id,
|
|
187
|
-
value: this.
|
|
187
|
+
value: this.id,
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
/*-------------------------------------------------*/
|
|
@@ -202,7 +202,7 @@ export class KupDropdownButton {
|
|
|
202
202
|
* Returns the component's internal value.
|
|
203
203
|
*/
|
|
204
204
|
async getValue() {
|
|
205
|
-
return this.
|
|
205
|
+
return this.id;
|
|
206
206
|
}
|
|
207
207
|
/**
|
|
208
208
|
* This method is used to trigger a new render of the component.
|
|
@@ -221,7 +221,7 @@ export class KupDropdownButton {
|
|
|
221
221
|
* Sets the internal value of the component.
|
|
222
222
|
*/
|
|
223
223
|
async setValue(value) {
|
|
224
|
-
this.
|
|
224
|
+
this.id = value;
|
|
225
225
|
}
|
|
226
226
|
/*-------------------------------------------------*/
|
|
227
227
|
/* P r i v a t e M e t h o d s */
|
|
@@ -280,9 +280,9 @@ export class KupDropdownButton {
|
|
|
280
280
|
/**
|
|
281
281
|
* Checks the consistency of the list.
|
|
282
282
|
*/
|
|
283
|
-
consistencyCheck(e,
|
|
284
|
-
const ret = consistencyCheck(
|
|
285
|
-
this.
|
|
283
|
+
consistencyCheck(e, idIn) {
|
|
284
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], this.listEl, this.selectMode, this.displayMode, e);
|
|
285
|
+
this.id = ret.value;
|
|
286
286
|
}
|
|
287
287
|
/*-------------------------------------------------*/
|
|
288
288
|
/* L i f e c y c l e H o o k s */
|
|
@@ -290,7 +290,7 @@ export class KupDropdownButton {
|
|
|
290
290
|
componentWillLoad() {
|
|
291
291
|
this.kupManager.debug.logLoad(this, false);
|
|
292
292
|
this.kupManager.theme.register(this);
|
|
293
|
-
this.
|
|
293
|
+
this.id = this.initialValue;
|
|
294
294
|
if (!this.data) {
|
|
295
295
|
this.data = {
|
|
296
296
|
'kup-list': {},
|
|
@@ -298,7 +298,7 @@ export class KupDropdownButton {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
componentDidLoad() {
|
|
301
|
-
this.consistencyCheck(undefined, this.
|
|
301
|
+
this.consistencyCheck(undefined, this.id);
|
|
302
302
|
this.kupManager.debug.logLoad(this, true);
|
|
303
303
|
}
|
|
304
304
|
componentWillRender() {
|
|
@@ -612,7 +612,7 @@ export class KupDropdownButton {
|
|
|
612
612
|
}
|
|
613
613
|
}; }
|
|
614
614
|
static get states() { return {
|
|
615
|
-
"
|
|
615
|
+
"id": {}
|
|
616
616
|
}; }
|
|
617
617
|
static get events() { return [{
|
|
618
618
|
"method": "kupBlur",
|
|
@@ -6,6 +6,8 @@ export var KupEchartProps;
|
|
|
6
6
|
(function (KupEchartProps) {
|
|
7
7
|
KupEchartProps["axis"] = "Sets the axis of the chart.";
|
|
8
8
|
KupEchartProps["chartTitle"] = "Title of the graph.";
|
|
9
|
+
KupEchartProps["colors"] = "Overrides theme's colors.";
|
|
10
|
+
KupEchartProps["consistencyCheck"] = "When true, performs checks in order to properly initialize props which could be missing (i.e.: axis). For performances purposes, this prop will run only once when the component is initially created.";
|
|
9
11
|
KupEchartProps["customStyle"] = "Custom style of the component.";
|
|
10
12
|
KupEchartProps["data"] = "The actual data of the chart.";
|
|
11
13
|
KupEchartProps["legend"] = "Sets the position of the legend. Supported values: bottom, left, right, top. Keep in mind that legend types are tied to chart types, some combinations might not work.";
|
|
@@ -21,6 +23,7 @@ export var KupEchartLegendPlacement;
|
|
|
21
23
|
(function (KupEchartLegendPlacement) {
|
|
22
24
|
KupEchartLegendPlacement["BOTTOM"] = "bottom";
|
|
23
25
|
KupEchartLegendPlacement["LEFT"] = "left";
|
|
26
|
+
KupEchartLegendPlacement["HIDDEN"] = "hidden";
|
|
24
27
|
KupEchartLegendPlacement["RIGHT"] = "right";
|
|
25
28
|
KupEchartLegendPlacement["TOP"] = "top";
|
|
26
29
|
})(KupEchartLegendPlacement || (KupEchartLegendPlacement = {}));
|
|
@@ -9,7 +9,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
|
-
var _KupEchart_instances,
|
|
12
|
+
var _KupEchart_instances, _KupEchart_chartContainer, _KupEchart_chartEl, _KupEchart_gaussianDatasets, _KupEchart_kupManager, _KupEchart_mapObj, _KupEchart_resizeTimeout, _KupEchart_sortedDataset, _KupEchart_themeBorder, _KupEchart_themeBackground, _KupEchart_computedColors, _KupEchart_minColorHeatMap, _KupEchart_maxColorHeatMap, _KupEchart_themeFont, _KupEchart_themeText, _KupEchart_initChart, _KupEchart_createChart, _KupEchart_createX, _KupEchart_createY, _KupEchart_setAxisColors, _KupEchart_setLegend, _KupEchart_setTitle, _KupEchart_setTooltip, _KupEchart_setVisualMap, _KupEchart_setMapOptions, _KupEchart_setPieOptions, _KupEchart_setGaussianOptions, _KupEchart_addSeries, _KupEchart_setOptions, _KupEchart_fetchcomputedColors, _KupEchart_checks;
|
|
13
13
|
import { Component, Element, Event, forceUpdate, getAssetPath, Host, h, Method, Prop, } from '@stencil/core';
|
|
14
14
|
import * as echarts from 'echarts';
|
|
15
15
|
import { KupEchartLegendPlacement, KupEchartMaps, KupEchartProps, KupEchartTypes, } from './kup-echart-declarations';
|
|
@@ -19,6 +19,7 @@ import { KupThemeColorValues } from '../../managers/kup-theme/kup-theme-declarat
|
|
|
19
19
|
import { getProps, setProps } from '../../utils/utils';
|
|
20
20
|
import { componentWrapperId } from '../../variables/GenericVariables';
|
|
21
21
|
import { getColumnByName } from '../../utils/cell-utils';
|
|
22
|
+
import { KupDataNewColumnTypes, } from '../../managers/kup-data/kup-data-declarations';
|
|
22
23
|
export class KupEchart {
|
|
23
24
|
constructor() {
|
|
24
25
|
_KupEchart_instances.add(this);
|
|
@@ -30,6 +31,17 @@ export class KupEchart {
|
|
|
30
31
|
* @default ""
|
|
31
32
|
*/
|
|
32
33
|
this.axis = '';
|
|
34
|
+
/**
|
|
35
|
+
* Overrides theme's colors.
|
|
36
|
+
* @default []
|
|
37
|
+
*/
|
|
38
|
+
this.colors = [];
|
|
39
|
+
/**
|
|
40
|
+
* When true, performs checks in order to properly initialize props which could be missing (i.e.: axis).
|
|
41
|
+
* For performances purposes, this prop will run only once when the component is initially created.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
this.consistencyCheck = false;
|
|
33
45
|
/**
|
|
34
46
|
* Title of the graph.
|
|
35
47
|
* @default null
|
|
@@ -47,7 +59,7 @@ export class KupEchart {
|
|
|
47
59
|
*/
|
|
48
60
|
this.data = null;
|
|
49
61
|
/**
|
|
50
|
-
* Sets the position of the legend. Supported values: bottom, left, right, top. Keep in mind that legend types are tied to chart types, some combinations might not work.
|
|
62
|
+
* Sets the position of the legend. Supported values: bottom, left, right, top, hidden. Keep in mind that legend types are tied to chart types, some combinations might not work.
|
|
51
63
|
* @default KupEchartLegendPlacement.RIGHT
|
|
52
64
|
*/
|
|
53
65
|
this.legend = KupEchartLegendPlacement.RIGHT;
|
|
@@ -89,20 +101,20 @@ export class KupEchart {
|
|
|
89
101
|
/*-------------------------------------------------*/
|
|
90
102
|
/* I n t e r n a l V a r i a b l e s */
|
|
91
103
|
/*-------------------------------------------------*/
|
|
92
|
-
_KupEchart_kupManager.set(this, kupManagerInstance());
|
|
93
|
-
_KupEchart_resizeTimeout.set(this, void 0);
|
|
94
104
|
_KupEchart_chartContainer.set(this, void 0);
|
|
95
105
|
_KupEchart_chartEl.set(this, void 0);
|
|
96
106
|
_KupEchart_gaussianDatasets.set(this, void 0);
|
|
107
|
+
_KupEchart_kupManager.set(this, kupManagerInstance());
|
|
108
|
+
_KupEchart_mapObj.set(this, {});
|
|
109
|
+
_KupEchart_resizeTimeout.set(this, void 0);
|
|
97
110
|
_KupEchart_sortedDataset.set(this, null);
|
|
98
111
|
_KupEchart_themeBorder.set(this, null);
|
|
99
112
|
_KupEchart_themeBackground.set(this, null);
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
113
|
+
_KupEchart_computedColors.set(this, null);
|
|
114
|
+
_KupEchart_minColorHeatMap.set(this, null);
|
|
115
|
+
_KupEchart_maxColorHeatMap.set(this, null);
|
|
103
116
|
_KupEchart_themeFont.set(this, null);
|
|
104
117
|
_KupEchart_themeText.set(this, null);
|
|
105
|
-
_KupEchart_mapObj.set(this, {});
|
|
106
118
|
}
|
|
107
119
|
/*-------------------------------------------------*/
|
|
108
120
|
/* P u b l i c M e t h o d s */
|
|
@@ -126,7 +138,19 @@ export class KupEchart {
|
|
|
126
138
|
*/
|
|
127
139
|
async resizeCallback() {
|
|
128
140
|
window.clearTimeout(__classPrivateFieldGet(this, _KupEchart_resizeTimeout, "f"));
|
|
129
|
-
__classPrivateFieldSet(this, _KupEchart_resizeTimeout, window.setTimeout(() =>
|
|
141
|
+
__classPrivateFieldSet(this, _KupEchart_resizeTimeout, window.setTimeout(() => {
|
|
142
|
+
if (__classPrivateFieldGet(this, _KupEchart_chartEl, "f")) {
|
|
143
|
+
const xMin = this.rootElement.clientWidth - 5;
|
|
144
|
+
const xMax = this.rootElement.clientWidth + 5;
|
|
145
|
+
const yMin = this.rootElement.clientHeight - 5;
|
|
146
|
+
const yMax = this.rootElement.clientHeight + 5;
|
|
147
|
+
const x = __classPrivateFieldGet(this, _KupEchart_chartEl, "f").getWidth();
|
|
148
|
+
const y = __classPrivateFieldGet(this, _KupEchart_chartEl, "f").getHeight();
|
|
149
|
+
if (x < xMin || x > xMax || y < yMin || y > yMax) {
|
|
150
|
+
__classPrivateFieldGet(this, _KupEchart_chartEl, "f").resize();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}, 300), "f");
|
|
130
154
|
}
|
|
131
155
|
/**
|
|
132
156
|
* Sets the props to the component.
|
|
@@ -141,6 +165,9 @@ export class KupEchart {
|
|
|
141
165
|
componentWillLoad() {
|
|
142
166
|
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logLoad(this, false);
|
|
143
167
|
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.register(this);
|
|
168
|
+
if (this.consistencyCheck) {
|
|
169
|
+
__classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_checks).call(this);
|
|
170
|
+
}
|
|
144
171
|
}
|
|
145
172
|
componentDidLoad() {
|
|
146
173
|
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").resize.observe(this.rootElement);
|
|
@@ -148,7 +175,7 @@ export class KupEchart {
|
|
|
148
175
|
}
|
|
149
176
|
componentWillRender() {
|
|
150
177
|
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logRender(this, false);
|
|
151
|
-
__classPrivateFieldGet(this, _KupEchart_instances, "m",
|
|
178
|
+
__classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_fetchcomputedColors).call(this);
|
|
152
179
|
}
|
|
153
180
|
componentDidRender() {
|
|
154
181
|
if (this.data && this.data.columns && this.data.rows) {
|
|
@@ -184,7 +211,7 @@ export class KupEchart {
|
|
|
184
211
|
static get properties() { return {
|
|
185
212
|
"axis": {
|
|
186
213
|
"type": "string",
|
|
187
|
-
"mutable":
|
|
214
|
+
"mutable": true,
|
|
188
215
|
"complexType": {
|
|
189
216
|
"original": "string",
|
|
190
217
|
"resolved": "string",
|
|
@@ -203,6 +230,46 @@ export class KupEchart {
|
|
|
203
230
|
"reflect": false,
|
|
204
231
|
"defaultValue": "''"
|
|
205
232
|
},
|
|
233
|
+
"colors": {
|
|
234
|
+
"type": "unknown",
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "string[]",
|
|
238
|
+
"resolved": "string[]",
|
|
239
|
+
"references": {}
|
|
240
|
+
},
|
|
241
|
+
"required": false,
|
|
242
|
+
"optional": false,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [{
|
|
245
|
+
"name": "default",
|
|
246
|
+
"text": "[]"
|
|
247
|
+
}],
|
|
248
|
+
"text": "Overrides theme's colors."
|
|
249
|
+
},
|
|
250
|
+
"defaultValue": "[]"
|
|
251
|
+
},
|
|
252
|
+
"consistencyCheck": {
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"mutable": false,
|
|
255
|
+
"complexType": {
|
|
256
|
+
"original": "boolean",
|
|
257
|
+
"resolved": "boolean",
|
|
258
|
+
"references": {}
|
|
259
|
+
},
|
|
260
|
+
"required": false,
|
|
261
|
+
"optional": false,
|
|
262
|
+
"docs": {
|
|
263
|
+
"tags": [{
|
|
264
|
+
"name": "default",
|
|
265
|
+
"text": "false"
|
|
266
|
+
}],
|
|
267
|
+
"text": "When true, performs checks in order to properly initialize props which could be missing (i.e.: axis).\r\nFor performances purposes, this prop will run only once when the component is initially created."
|
|
268
|
+
},
|
|
269
|
+
"attribute": "consistency-check",
|
|
270
|
+
"reflect": false,
|
|
271
|
+
"defaultValue": "false"
|
|
272
|
+
},
|
|
206
273
|
"chartTitle": {
|
|
207
274
|
"type": "unknown",
|
|
208
275
|
"mutable": false,
|
|
@@ -280,7 +347,7 @@ export class KupEchart {
|
|
|
280
347
|
"mutable": false,
|
|
281
348
|
"complexType": {
|
|
282
349
|
"original": "KupEchartLegendPlacement",
|
|
283
|
-
"resolved": "KupEchartLegendPlacement.BOTTOM | KupEchartLegendPlacement.LEFT | KupEchartLegendPlacement.RIGHT | KupEchartLegendPlacement.TOP",
|
|
350
|
+
"resolved": "KupEchartLegendPlacement.BOTTOM | KupEchartLegendPlacement.HIDDEN | KupEchartLegendPlacement.LEFT | KupEchartLegendPlacement.RIGHT | KupEchartLegendPlacement.TOP",
|
|
284
351
|
"references": {
|
|
285
352
|
"KupEchartLegendPlacement": {
|
|
286
353
|
"location": "import",
|
|
@@ -295,7 +362,7 @@ export class KupEchart {
|
|
|
295
362
|
"name": "default",
|
|
296
363
|
"text": "KupEchartLegendPlacement.RIGHT"
|
|
297
364
|
}],
|
|
298
|
-
"text": "Sets the position of the legend. Supported values: bottom, left, right, top. Keep in mind that legend types are tied to chart types, some combinations might not work."
|
|
365
|
+
"text": "Sets the position of the legend. Supported values: bottom, left, right, top, hidden. Keep in mind that legend types are tied to chart types, some combinations might not work."
|
|
299
366
|
},
|
|
300
367
|
"attribute": "legend",
|
|
301
368
|
"reflect": false,
|
|
@@ -583,7 +650,7 @@ export class KupEchart {
|
|
|
583
650
|
}; }
|
|
584
651
|
static get elementRef() { return "rootElement"; }
|
|
585
652
|
}
|
|
586
|
-
|
|
653
|
+
_KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _KupEchart_gaussianDatasets = new WeakMap(), _KupEchart_kupManager = new WeakMap(), _KupEchart_mapObj = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(), _KupEchart_sortedDataset = new WeakMap(), _KupEchart_themeBorder = new WeakMap(), _KupEchart_themeBackground = new WeakMap(), _KupEchart_computedColors = new WeakMap(), _KupEchart_minColorHeatMap = new WeakMap(), _KupEchart_maxColorHeatMap = new WeakMap(), _KupEchart_themeFont = new WeakMap(), _KupEchart_themeText = new WeakMap(), _KupEchart_instances = new WeakSet(), _KupEchart_initChart = function _KupEchart_initChart() {
|
|
587
654
|
if (__classPrivateFieldGet(this, _KupEchart_chartEl, "f")) {
|
|
588
655
|
echarts.dispose(__classPrivateFieldGet(this, _KupEchart_chartContainer, "f"));
|
|
589
656
|
}
|
|
@@ -596,18 +663,6 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
596
663
|
}
|
|
597
664
|
}, _KupEchart_createChart = async function _KupEchart_createChart() {
|
|
598
665
|
__classPrivateFieldSet(this, _KupEchart_sortedDataset, null, "f");
|
|
599
|
-
if (!this.types.includes(KupEchartTypes.GAUSSIAN) &&
|
|
600
|
-
(!this.axis ||
|
|
601
|
-
!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.datasetOperations.column.find(this.data, { name: this.axis }).length)) {
|
|
602
|
-
for (let index = 0; index < this.data.columns.length; index++) {
|
|
603
|
-
const column = this.data.columns[index];
|
|
604
|
-
if (!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").objects.isNumber(column.obj)) {
|
|
605
|
-
this.axis = column.name;
|
|
606
|
-
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logMessage(this, 'Axis overridden. (' + this.axis + ')', KupDebugCategory.WARNING);
|
|
607
|
-
break;
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
666
|
let options = null;
|
|
612
667
|
const firstType = this.types[0];
|
|
613
668
|
switch (firstType) {
|
|
@@ -643,12 +698,14 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
643
698
|
}
|
|
644
699
|
__classPrivateFieldGet(this, _KupEchart_chartEl, "f").setOption(options, true);
|
|
645
700
|
__classPrivateFieldGet(this, _KupEchart_chartEl, "f").on('click', (e) => {
|
|
646
|
-
const column = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.
|
|
701
|
+
const column = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
|
|
647
702
|
title: e.seriesName,
|
|
648
703
|
})[0];
|
|
649
704
|
let row = null;
|
|
650
705
|
if (e.seriesType === 'map') {
|
|
651
|
-
row = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.
|
|
706
|
+
row = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.row.find(this.data, {
|
|
707
|
+
value: __classPrivateFieldGet(this, _KupEchart_mapObj, "f")[e.name],
|
|
708
|
+
})[0];
|
|
652
709
|
}
|
|
653
710
|
else if (__classPrivateFieldGet(this, _KupEchart_sortedDataset, "f") && e.seriesType === 'bar') {
|
|
654
711
|
row = __classPrivateFieldGet(this, _KupEchart_sortedDataset, "f").rows[e.dataIndex];
|
|
@@ -745,6 +802,9 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
745
802
|
splitLine: { lineStyle: { color: __classPrivateFieldGet(this, _KupEchart_themeBorder, "f") } },
|
|
746
803
|
};
|
|
747
804
|
}, _KupEchart_setLegend = function _KupEchart_setLegend(y) {
|
|
805
|
+
if (this.legend === KupEchartLegendPlacement.HIDDEN) {
|
|
806
|
+
return null;
|
|
807
|
+
}
|
|
748
808
|
const data = [];
|
|
749
809
|
for (let key in y) {
|
|
750
810
|
data.push(key);
|
|
@@ -790,17 +850,23 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
790
850
|
const colorRange = !hasNumericValues
|
|
791
851
|
? undefined
|
|
792
852
|
: colors.length > 0
|
|
793
|
-
? {
|
|
853
|
+
? {
|
|
854
|
+
inRange: { color: colors },
|
|
855
|
+
min: min,
|
|
856
|
+
max: max,
|
|
857
|
+
textStyle: { color: __classPrivateFieldGet(this, _KupEchart_themeText, "f") },
|
|
858
|
+
}
|
|
794
859
|
: {
|
|
795
860
|
inRange: {
|
|
796
|
-
color: [__classPrivateFieldGet(this,
|
|
861
|
+
color: [__classPrivateFieldGet(this, _KupEchart_minColorHeatMap, "f"), __classPrivateFieldGet(this, _KupEchart_maxColorHeatMap, "f")],
|
|
797
862
|
},
|
|
798
863
|
min: min,
|
|
799
864
|
max: max,
|
|
865
|
+
textStyle: { color: __classPrivateFieldGet(this, _KupEchart_themeText, "f") },
|
|
800
866
|
};
|
|
801
867
|
if (colorRange) {
|
|
802
868
|
opts.visualMap = Object.assign(Object.assign(Object.assign({}, opts.visualMap), colorRange), { calculable: true, formatter: (value) => {
|
|
803
|
-
return __classPrivateFieldGet(this, _KupEchart_kupManager, "f").
|
|
869
|
+
return __classPrivateFieldGet(this, _KupEchart_kupManager, "f").math.format(value);
|
|
804
870
|
}, min: min, max: max, show: true });
|
|
805
871
|
}
|
|
806
872
|
return opts;
|
|
@@ -846,7 +912,7 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
846
912
|
color = hexColor;
|
|
847
913
|
}
|
|
848
914
|
else {
|
|
849
|
-
n = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").
|
|
915
|
+
n = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").math.numberify(value);
|
|
850
916
|
if (n > max) {
|
|
851
917
|
max = n;
|
|
852
918
|
}
|
|
@@ -886,11 +952,9 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
886
952
|
return null;
|
|
887
953
|
}
|
|
888
954
|
else {
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
': ' +
|
|
893
|
-
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.format(value));
|
|
955
|
+
return ("<div style='min-width: 60px; text-align: center'>" +
|
|
956
|
+
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").math.format(value) +
|
|
957
|
+
'</div>');
|
|
894
958
|
}
|
|
895
959
|
};
|
|
896
960
|
const echartOption = Object.assign({ emphasis: {
|
|
@@ -901,13 +965,44 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
901
965
|
{
|
|
902
966
|
data: data,
|
|
903
967
|
emphasis: {
|
|
968
|
+
itemStyle: {
|
|
969
|
+
areaColor: null,
|
|
970
|
+
borderWidth: 1.5,
|
|
971
|
+
},
|
|
904
972
|
label: {
|
|
973
|
+
color: __classPrivateFieldGet(this, _KupEchart_themeText, "f"),
|
|
974
|
+
fontFamily: __classPrivateFieldGet(this, _KupEchart_themeFont, "f"),
|
|
905
975
|
show: true,
|
|
906
976
|
},
|
|
907
977
|
},
|
|
978
|
+
itemStyle: {
|
|
979
|
+
areaColor: __classPrivateFieldGet(this, _KupEchart_themeBackground, "f"),
|
|
980
|
+
borderColor: __classPrivateFieldGet(this, _KupEchart_themeText, "f"),
|
|
981
|
+
},
|
|
982
|
+
label: {
|
|
983
|
+
backgroundColor: __classPrivateFieldGet(this, _KupEchart_themeBackground, "f"),
|
|
984
|
+
borderColor: __classPrivateFieldGet(this, _KupEchart_themeBorder, "f"),
|
|
985
|
+
borderRadius: 4,
|
|
986
|
+
borderWidth: 1,
|
|
987
|
+
color: __classPrivateFieldGet(this, _KupEchart_themeText, "f"),
|
|
988
|
+
fontFamily: __classPrivateFieldGet(this, _KupEchart_themeFont, "f"),
|
|
989
|
+
padding: 4,
|
|
990
|
+
},
|
|
908
991
|
map: this.rootElement.id ? this.rootElement.id : '',
|
|
909
|
-
name: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.
|
|
992
|
+
name: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
|
|
993
|
+
name: this.axis,
|
|
994
|
+
})[0].title,
|
|
910
995
|
roam: true,
|
|
996
|
+
select: {
|
|
997
|
+
itemStyle: {
|
|
998
|
+
areaColor: __classPrivateFieldGet(this, _KupEchart_computedColors, "f")[0],
|
|
999
|
+
},
|
|
1000
|
+
label: {
|
|
1001
|
+
color: __classPrivateFieldGet(this, _KupEchart_themeText, "f"),
|
|
1002
|
+
fontFamily: __classPrivateFieldGet(this, _KupEchart_themeFont, "f"),
|
|
1003
|
+
show: true,
|
|
1004
|
+
},
|
|
1005
|
+
},
|
|
911
1006
|
type: 'map',
|
|
912
1007
|
},
|
|
913
1008
|
] }, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setVisualMap).call(this, max, min, colors, hasNumericValues));
|
|
@@ -926,13 +1021,15 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
926
1021
|
});
|
|
927
1022
|
}
|
|
928
1023
|
return {
|
|
929
|
-
color: __classPrivateFieldGet(this,
|
|
1024
|
+
color: __classPrivateFieldGet(this, _KupEchart_computedColors, "f"),
|
|
930
1025
|
legend: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setLegend).call(this, y),
|
|
931
1026
|
title: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTitle).call(this),
|
|
932
1027
|
tooltip: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTooltip).call(this)), { trigger: 'item', formatter: '{a} <br/>{b}: {c} ({d}%)' }),
|
|
933
1028
|
series: [
|
|
934
1029
|
{
|
|
935
|
-
name: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.
|
|
1030
|
+
name: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
|
|
1031
|
+
name: this.axis,
|
|
1032
|
+
})[0].title,
|
|
936
1033
|
type: 'pie',
|
|
937
1034
|
data: data,
|
|
938
1035
|
emphasis: {
|
|
@@ -965,9 +1062,10 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
965
1062
|
const column = this.data.columns.find((col) => col.title === key);
|
|
966
1063
|
if (type == KupEchartTypes.GAUSSIAN) {
|
|
967
1064
|
if (!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").objects.isNumber(column.obj)) {
|
|
968
|
-
const newDataset = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.
|
|
969
|
-
values =
|
|
970
|
-
|
|
1065
|
+
const newDataset = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.distinct(this.data, [column.name]);
|
|
1066
|
+
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(newDataset, [
|
|
1067
|
+
column.name,
|
|
1068
|
+
]);
|
|
971
1069
|
__classPrivateFieldGet(this, _KupEchart_gaussianDatasets, "f")[column.name] = newDataset;
|
|
972
1070
|
}
|
|
973
1071
|
else {
|
|
@@ -977,14 +1075,14 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
977
1075
|
else {
|
|
978
1076
|
if (needSortDataset) {
|
|
979
1077
|
// if there is only one series other than the Gaussian then I apply the sorting algorithm that arranges the data in "mountain"
|
|
980
|
-
__classPrivateFieldSet(this, _KupEchart_sortedDataset, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.
|
|
981
|
-
values =
|
|
982
|
-
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.datasetOperations.cell.getValue(__classPrivateFieldGet(this, _KupEchart_sortedDataset, "f"), [column.name]);
|
|
1078
|
+
__classPrivateFieldSet(this, _KupEchart_sortedDataset, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.sort(this.data, 'normalDistribution', column.name), "f");
|
|
1079
|
+
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(__classPrivateFieldGet(this, _KupEchart_sortedDataset, "f"), [column.name]);
|
|
983
1080
|
x = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_createX).call(this, __classPrivateFieldGet(this, _KupEchart_sortedDataset, "f"));
|
|
984
1081
|
}
|
|
985
1082
|
else {
|
|
986
|
-
values =
|
|
987
|
-
|
|
1083
|
+
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getValue(this.data, [
|
|
1084
|
+
column.name,
|
|
1085
|
+
]);
|
|
988
1086
|
}
|
|
989
1087
|
}
|
|
990
1088
|
__classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_addSeries).call(this, type, series, values, key, mixedSeries, needSortDataset);
|
|
@@ -1013,7 +1111,7 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
1013
1111
|
min: value - (value / 100) * 50,
|
|
1014
1112
|
},
|
|
1015
1113
|
};
|
|
1016
|
-
const rows = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.
|
|
1114
|
+
const rows = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.row.find(__classPrivateFieldGet(this, _KupEchart_gaussianDatasets, "f")[column]
|
|
1017
1115
|
? __classPrivateFieldGet(this, _KupEchart_gaussianDatasets, "f")[column]
|
|
1018
1116
|
: this.data, filters);
|
|
1019
1117
|
for (let index = 0; index < rows.length; index++) {
|
|
@@ -1070,7 +1168,7 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
1070
1168
|
yAxisTmp.splice(0, 1);
|
|
1071
1169
|
}
|
|
1072
1170
|
return {
|
|
1073
|
-
color: __classPrivateFieldGet(this,
|
|
1171
|
+
color: __classPrivateFieldGet(this, _KupEchart_computedColors, "f"),
|
|
1074
1172
|
legend: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setLegend).call(this, y),
|
|
1075
1173
|
series: series,
|
|
1076
1174
|
title: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTitle).call(this),
|
|
@@ -1082,7 +1180,7 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
1082
1180
|
switch (type) {
|
|
1083
1181
|
case KupEchartTypes.GAUSSIAN:
|
|
1084
1182
|
series.push({
|
|
1085
|
-
data: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").
|
|
1183
|
+
data: __classPrivateFieldGet(this, _KupEchart_kupManager, "f").math.normalDistribution(values),
|
|
1086
1184
|
name: key,
|
|
1087
1185
|
showSymbol: false,
|
|
1088
1186
|
smooth: true,
|
|
@@ -1133,7 +1231,7 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
1133
1231
|
i++;
|
|
1134
1232
|
}
|
|
1135
1233
|
return {
|
|
1136
|
-
color: __classPrivateFieldGet(this,
|
|
1234
|
+
color: __classPrivateFieldGet(this, _KupEchart_computedColors, "f"),
|
|
1137
1235
|
legend: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setLegend).call(this, y),
|
|
1138
1236
|
series: series,
|
|
1139
1237
|
title: __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTitle).call(this),
|
|
@@ -1141,8 +1239,8 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
1141
1239
|
xAxis: Object.assign(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setAxisColors).call(this)), { data: x, type: 'category' }), this.xAxis),
|
|
1142
1240
|
yAxis: Object.assign(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setAxisColors).call(this)), { type: 'value' }), this.yAxis),
|
|
1143
1241
|
};
|
|
1144
|
-
},
|
|
1145
|
-
let colorArray = [];
|
|
1242
|
+
}, _KupEchart_fetchcomputedColors = function _KupEchart_fetchcomputedColors() {
|
|
1243
|
+
let colorArray = this.colors && this.colors.length > 0 ? [...this.colors] : [];
|
|
1146
1244
|
let key = '--kup-chart-color-';
|
|
1147
1245
|
for (let index = 1; __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars[key + index]; index++) {
|
|
1148
1246
|
colorArray.push(__classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars[key + index]);
|
|
@@ -1151,8 +1249,98 @@ _KupEchart_kupManager = new WeakMap(), _KupEchart_resizeTimeout = new WeakMap(),
|
|
|
1151
1249
|
__classPrivateFieldSet(this, _KupEchart_themeBorder, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars[KupThemeColorValues.BORDER], "f");
|
|
1152
1250
|
__classPrivateFieldSet(this, _KupEchart_themeFont, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars['--kup-font-family'], "f");
|
|
1153
1251
|
__classPrivateFieldSet(this, _KupEchart_themeText, __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.cssVars[KupThemeColorValues.TEXT], "f");
|
|
1154
|
-
__classPrivateFieldSet(this,
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1252
|
+
__classPrivateFieldSet(this, _KupEchart_computedColors, colorArray, "f");
|
|
1253
|
+
if (this.colors && this.colors[0]) {
|
|
1254
|
+
__classPrivateFieldSet(this, _KupEchart_maxColorHeatMap, this.colors[0], "f");
|
|
1255
|
+
}
|
|
1256
|
+
else {
|
|
1257
|
+
const colorCheckDark = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.colorCheck(colorArray[0]);
|
|
1258
|
+
__classPrivateFieldSet(this, _KupEchart_maxColorHeatMap, `hsl(${colorCheckDark.hue}, ${colorCheckDark.saturation}, ${(parseFloat(colorCheckDark.lightness) - 30).toString()}%)`, "f");
|
|
1259
|
+
}
|
|
1260
|
+
if (this.colors && this.colors[1]) {
|
|
1261
|
+
__classPrivateFieldSet(this, _KupEchart_minColorHeatMap, this.colors[1], "f");
|
|
1262
|
+
}
|
|
1263
|
+
else {
|
|
1264
|
+
const colorCheckBright = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").theme.colorCheck(colorArray[0]);
|
|
1265
|
+
__classPrivateFieldSet(this, _KupEchart_minColorHeatMap, `hsl(${colorCheckBright.hue}, ${colorCheckBright.saturation}, ${(parseFloat(colorCheckBright.lightness) + 30).toString()}%)`, "f");
|
|
1266
|
+
}
|
|
1267
|
+
}, _KupEchart_checks = function _KupEchart_checks() {
|
|
1268
|
+
const gaussianCount = this.types.filter((type) => type === KupEchartTypes.GAUSSIAN).length;
|
|
1269
|
+
const nonGaussianCount = this.types.filter((type) => type === KupEchartTypes.GAUSSIAN).length;
|
|
1270
|
+
// Automatically sets axis when there is no Gaussian chart and when axis is invalid.
|
|
1271
|
+
// The first visible and non-numerical column will be used as axis.
|
|
1272
|
+
if (!gaussianCount &&
|
|
1273
|
+
(!this.axis ||
|
|
1274
|
+
!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
|
|
1275
|
+
name: this.axis,
|
|
1276
|
+
}).length)) {
|
|
1277
|
+
for (let index = 0; index < this.data.columns.length; index++) {
|
|
1278
|
+
const column = this.data.columns[index];
|
|
1279
|
+
if (column.visible &&
|
|
1280
|
+
!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").objects.isNumber(column.obj)) {
|
|
1281
|
+
this.axis = column.name;
|
|
1282
|
+
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").debug.logMessage(this, 'Axis overridden. (' + this.axis + ')', KupDebugCategory.WARNING);
|
|
1283
|
+
break;
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
// Automatically copies columns when there are multiple types and no specified series.
|
|
1288
|
+
// Also 1 types must be GAUSSIAN.
|
|
1289
|
+
if ((!this.series || !this.series.length) &&
|
|
1290
|
+
gaussianCount === 1 &&
|
|
1291
|
+
nonGaussianCount > 0 &&
|
|
1292
|
+
this.data.columns &&
|
|
1293
|
+
((this.data.columns.length === 1 && !this.axis) ||
|
|
1294
|
+
(this.data.columns.length === 2 && this.axis))) {
|
|
1295
|
+
const series = !this.axis
|
|
1296
|
+
? this.data.columns[0]
|
|
1297
|
+
: this.data.columns.filter((col) => col.name !== this.axis)[0];
|
|
1298
|
+
for (let index = 0; index < this.types.length; index++) {
|
|
1299
|
+
const type = this.types[index];
|
|
1300
|
+
if (type !== KupEchartTypes.GAUSSIAN) {
|
|
1301
|
+
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.new(this.data, KupDataNewColumnTypes.DUPLICATE, {
|
|
1302
|
+
columns: [series.name],
|
|
1303
|
+
newColumn: Object.assign(Object.assign({}, series), { name: series.name + '_' + index, title: series.title + ` (${type})` }),
|
|
1304
|
+
});
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
// Checks for multiple series with the same column name, creating duplicate columns in case they are present.
|
|
1309
|
+
// When there are more types than series, new series will be automatically added to match chart types.
|
|
1310
|
+
if (this.series &&
|
|
1311
|
+
this.types &&
|
|
1312
|
+
this.series.length &&
|
|
1313
|
+
this.types.length &&
|
|
1314
|
+
this.data.columns) {
|
|
1315
|
+
if (this.types.length > this.series.length) {
|
|
1316
|
+
const lastSerie = this.series[this.series.length - 1];
|
|
1317
|
+
for (let index = this.series.length; index < this.types.length; index++) {
|
|
1318
|
+
this.series.push(lastSerie);
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
const occurrences = {};
|
|
1322
|
+
for (let index = 0; index < this.series.length; index++) {
|
|
1323
|
+
const serie = this.series[index];
|
|
1324
|
+
if (Object.keys(occurrences).includes(serie)) {
|
|
1325
|
+
occurrences[serie].push(index);
|
|
1326
|
+
}
|
|
1327
|
+
else {
|
|
1328
|
+
occurrences[serie] = [index];
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
for (const key in occurrences) {
|
|
1332
|
+
const indexes = occurrences[key];
|
|
1333
|
+
for (let index = 1; indexes.length > 1 && index < indexes.length; index++) {
|
|
1334
|
+
const seriesIndex = indexes[index];
|
|
1335
|
+
const column = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, { name: this.series[seriesIndex] })[0];
|
|
1336
|
+
const newName = column.name + '_' + index;
|
|
1337
|
+
__classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.new(this.data, KupDataNewColumnTypes.DUPLICATE, {
|
|
1338
|
+
columns: [column.name],
|
|
1339
|
+
newColumn: Object.assign(Object.assign({}, column), { name: newName, title: column.title +
|
|
1340
|
+
` (${this.types[seriesIndex]})` }),
|
|
1341
|
+
});
|
|
1342
|
+
this.series[seriesIndex] = newName;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1158
1346
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 24 24"><path d="M7.8,2H16.2C19.4,2 22,4.6 22,7.8V16.2A5.8,5.8 0 0,1 16.2,22H7.8C4.6,22 2,19.4 2,16.2V7.8A5.8,5.8 0 0,1 7.8,2M7.6,4A3.6,3.6 0 0,0 4,7.6V16.4C4,18.39 5.61,20 7.6,20H16.4A3.6,3.6 0 0,0 20,16.4V7.6C20,5.61 18.39,4 16.4,4H7.6M17.25,5.5A1.25,1.25 0 0,1 18.5,6.75A1.25,1.25 0 0,1 17.25,8A1.25,1.25 0 0,1 16,6.75A1.25,1.25 0 0,1 17.25,5.5M12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9Z" /></svg>
|