evui 3.4.152 → 3.4.153
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/evui.common.js +40 -41
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +40 -41
- package/dist/evui.umd.js.map +1 -1
- package/dist/evui.umd.min.js +1 -1
- package/dist/evui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chart/chart.core.js +25 -19
- package/src/components/chart/plugins/plugins.interaction.js +5 -2
- package/src/components/chart/plugins/plugins.scrollbar.js +2 -9
package/package.json
CHANGED
|
@@ -127,6 +127,10 @@ class EvChart {
|
|
|
127
127
|
this.axesX = this.createAxes('x', axesX);
|
|
128
128
|
this.axesY = this.createAxes('y', axesY);
|
|
129
129
|
|
|
130
|
+
if (axesX?.[0]?.scrollbar?.use || axesY?.[0]?.scrollbar?.use) {
|
|
131
|
+
this.initScrollbar();
|
|
132
|
+
}
|
|
133
|
+
|
|
130
134
|
this.initDefaultSelectInfo();
|
|
131
135
|
|
|
132
136
|
this.drawChart();
|
|
@@ -162,10 +166,6 @@ class EvChart {
|
|
|
162
166
|
this.setLegendPosition();
|
|
163
167
|
}
|
|
164
168
|
|
|
165
|
-
if (opt.axesX?.[0]?.scrollbar?.use || opt.axesY?.[0]?.scrollbar?.use) {
|
|
166
|
-
this.initScrollbar();
|
|
167
|
-
}
|
|
168
|
-
|
|
169
169
|
this.chartRect = this.getChartRect();
|
|
170
170
|
}
|
|
171
171
|
|
|
@@ -277,7 +277,6 @@ class EvChart {
|
|
|
277
277
|
this.drawSeries(hitInfo);
|
|
278
278
|
|
|
279
279
|
if (this.scrollbar?.x?.use || this.scrollbar?.y?.use) {
|
|
280
|
-
this.initScrollbar();
|
|
281
280
|
this.updateScrollbarPosition();
|
|
282
281
|
}
|
|
283
282
|
|
|
@@ -852,6 +851,21 @@ class EvChart {
|
|
|
852
851
|
return labelOffset;
|
|
853
852
|
}
|
|
854
853
|
|
|
854
|
+
/**
|
|
855
|
+
* Update scrollbar information
|
|
856
|
+
* @param {boolean} updateData is update data
|
|
857
|
+
* @returns {undefined}
|
|
858
|
+
*/
|
|
859
|
+
updateScrollbar(updateData) {
|
|
860
|
+
if (this.scrollbar?.x?.isInit || this.options.axesX?.[0]?.scrollbar?.use) {
|
|
861
|
+
this.updateScrollbarInfo('x', updateData);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
if (this.scrollbar?.y?.isInit || this.options.axesY?.[0]?.scrollbar?.use) {
|
|
865
|
+
this.updateScrollbarInfo('y', updateData);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
|
|
855
869
|
/**
|
|
856
870
|
* To re-render chart, reset properties, canvas and then render chart.
|
|
857
871
|
* @param {object} updateInfo information for each components are needed to update
|
|
@@ -871,7 +885,6 @@ class EvChart {
|
|
|
871
885
|
updateLegend,
|
|
872
886
|
updateData,
|
|
873
887
|
updateTooltip,
|
|
874
|
-
updateByScrollbar,
|
|
875
888
|
lightUpdate,
|
|
876
889
|
} = updateInfo;
|
|
877
890
|
|
|
@@ -879,9 +892,7 @@ class EvChart {
|
|
|
879
892
|
return;
|
|
880
893
|
}
|
|
881
894
|
|
|
882
|
-
|
|
883
|
-
this.updateScrollbar?.(updateData);
|
|
884
|
-
}
|
|
895
|
+
this.updateScrollbar(updateData);
|
|
885
896
|
|
|
886
897
|
this.resetProps();
|
|
887
898
|
|
|
@@ -992,7 +1003,6 @@ class EvChart {
|
|
|
992
1003
|
|
|
993
1004
|
this.initDefaultSelectInfo();
|
|
994
1005
|
|
|
995
|
-
|
|
996
1006
|
let renderHitInfo = updateInfo?.hitInfo;
|
|
997
1007
|
if (!renderHitInfo?.legend && this.legendHover?.sId) {
|
|
998
1008
|
renderHitInfo = { ...(renderHitInfo || {}), legend: this.legendHover };
|
|
@@ -1065,20 +1075,16 @@ class EvChart {
|
|
|
1065
1075
|
* @returns {undefined}
|
|
1066
1076
|
*/
|
|
1067
1077
|
resize(promiseRes) {
|
|
1068
|
-
// 차트 크기가 변경될 때 저장된 스크롤 픽셀 위치를 초기화하여
|
|
1069
|
-
// 새로운 크기에 맞춰 스크롤바 크기/위치를 재계산하도록 함
|
|
1070
|
-
if (this.scrollbar?.x) {
|
|
1071
|
-
delete this.scrollbar.x.savedPosition;
|
|
1072
|
-
}
|
|
1073
|
-
if (this.scrollbar?.y) {
|
|
1074
|
-
delete this.scrollbar.y.savedPosition;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
1078
|
this.clear();
|
|
1078
1079
|
this.bufferCtx.restore();
|
|
1079
1080
|
this.bufferCtx.save();
|
|
1080
1081
|
|
|
1081
1082
|
this.initRect();
|
|
1083
|
+
|
|
1084
|
+
if (this.options.axesX?.[0]?.scrollbar?.use || this.options.axesY?.[0]?.scrollbar?.use) {
|
|
1085
|
+
this.initScrollbar();
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1082
1088
|
this.initScale();
|
|
1083
1089
|
this.chartRect = this.getChartRect();
|
|
1084
1090
|
this.drawChart();
|
|
@@ -1018,8 +1018,11 @@ const modules = {
|
|
|
1018
1018
|
const isHorizontal = !!this.options.horizontal;
|
|
1019
1019
|
const mousePos = isHorizontal ? yp : xp;
|
|
1020
1020
|
|
|
1021
|
-
//
|
|
1022
|
-
const referenceSeries = sIds.find(sId =>
|
|
1021
|
+
// 데이터 있는 시리즈를 기준으로 라벨 위치 확인
|
|
1022
|
+
const referenceSeries = sIds.find((sId) => {
|
|
1023
|
+
const series = this.seriesList[sId];
|
|
1024
|
+
return series?.show && series?.data?.length > 0;
|
|
1025
|
+
});
|
|
1023
1026
|
if (!referenceSeries || !this.seriesList[referenceSeries]?.data) {
|
|
1024
1027
|
return -1;
|
|
1025
1028
|
}
|
|
@@ -29,6 +29,8 @@ const module = {
|
|
|
29
29
|
scrollbarOpt[key] = merged[key];
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
+
delete scrollbarOpt.savedPosition;
|
|
33
|
+
|
|
32
34
|
if (!scrollbarOpt.isInit) {
|
|
33
35
|
scrollbarOpt.type = axisOpt?.[0]?.type;
|
|
34
36
|
scrollbarOpt.range = axisOpt?.[0]?.range?.length ? [...axisOpt?.[0]?.range] : null;
|
|
@@ -83,14 +85,6 @@ const module = {
|
|
|
83
85
|
}
|
|
84
86
|
},
|
|
85
87
|
|
|
86
|
-
/**
|
|
87
|
-
* update scrollbar information
|
|
88
|
-
*/
|
|
89
|
-
updateScrollbar(updateData) {
|
|
90
|
-
this.updateScrollbarInfo('x', updateData);
|
|
91
|
-
this.updateScrollbarInfo('y', updateData);
|
|
92
|
-
},
|
|
93
|
-
|
|
94
88
|
/**
|
|
95
89
|
* Updated scrollbar information with updated axis information
|
|
96
90
|
* @param dir axis direction (x | y)
|
|
@@ -449,7 +443,6 @@ const module = {
|
|
|
449
443
|
this.update({
|
|
450
444
|
updateSeries: false,
|
|
451
445
|
updateSelTip: { update: false, keepDomain: false },
|
|
452
|
-
updateByScrollbar: true,
|
|
453
446
|
lightUpdate: minValue > 1,
|
|
454
447
|
});
|
|
455
448
|
}
|