evui 3.3.47 → 3.3.48
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 +130 -98
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +130 -98
- 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/element/element.heatmap.js +12 -1
- package/src/components/chart/helpers/helpers.util.js +1 -1
- package/src/components/chart/model/model.store.js +1 -0
- package/src/components/chart/plugins/plugins.legend.js +16 -14
- package/src/components/chart/plugins/plugins.tooltip.js +4 -2
- package/src/components/chart/uses.js +1 -0
- package/src/components/treeGrid/TreeGridNode.vue +8 -3
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@ class HeatMap {
|
|
|
35
35
|
createColorState(colorOpt) {
|
|
36
36
|
const colorState = [];
|
|
37
37
|
const regex = /[^0-9]&[^,]/g;
|
|
38
|
-
const { min, max, categoryCnt, error, stroke } = colorOpt;
|
|
38
|
+
const { min, max, categoryCnt, categoryColors, error, stroke } = colorOpt;
|
|
39
39
|
|
|
40
40
|
const minColor = min.includes('#') ? Util.hexToRgb(min) : min.replace(regex, '');
|
|
41
41
|
const maxColor = max.includes('#') ? Util.hexToRgb(max) : max.replace(regex, '');
|
|
@@ -52,6 +52,17 @@ class HeatMap {
|
|
|
52
52
|
end: 100,
|
|
53
53
|
selectedValue: null,
|
|
54
54
|
});
|
|
55
|
+
} else if (categoryColors.length) {
|
|
56
|
+
colorOpt.categoryCnt = categoryColors.length;
|
|
57
|
+
categoryColors.forEach(({ color, label }, ix) => {
|
|
58
|
+
colorState.push({
|
|
59
|
+
id: `color#${ix}`,
|
|
60
|
+
color,
|
|
61
|
+
label,
|
|
62
|
+
state: 'normal',
|
|
63
|
+
show: true,
|
|
64
|
+
});
|
|
65
|
+
});
|
|
55
66
|
} else {
|
|
56
67
|
const unitR = Math.floor((minR - maxR) / (categoryCnt - 1));
|
|
57
68
|
const unitG = Math.floor((minG - maxG) / (categoryCnt - 1));
|
|
@@ -147,8 +147,9 @@ const modules = {
|
|
|
147
147
|
const { min, max, interval, existError, decimalPoint } = valueOpt;
|
|
148
148
|
const length = colorState.length;
|
|
149
149
|
const endIndex = existError ? length - 2 : length - 1;
|
|
150
|
+
|
|
150
151
|
for (let index = 0; index < length; index++) {
|
|
151
|
-
const
|
|
152
|
+
const { id, color, label = '' } = colorState[index];
|
|
152
153
|
const minValue = min + (interval * index);
|
|
153
154
|
let maxValue = minValue + interval;
|
|
154
155
|
if (index < endIndex) {
|
|
@@ -157,24 +158,25 @@ const modules = {
|
|
|
157
158
|
maxValue = max + (0.1 ** decimalPoint);
|
|
158
159
|
}
|
|
159
160
|
|
|
160
|
-
let name =
|
|
161
|
-
if (
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
let name = label;
|
|
162
|
+
if (!name) {
|
|
163
|
+
name = `${minValue.toFixed(decimalPoint)} - ${maxValue.toFixed(decimalPoint)}`;
|
|
164
|
+
if (min === undefined || max === undefined) {
|
|
165
|
+
if (index === 0) {
|
|
166
|
+
name = '0';
|
|
167
|
+
} else {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
} else if (minValue > max) {
|
|
165
171
|
break;
|
|
172
|
+
} else if (interval <= 1 && decimalPoint === 0) {
|
|
173
|
+
name = minValue;
|
|
166
174
|
}
|
|
167
|
-
} else if (existError && index === endIndex + 1) {
|
|
168
|
-
name = 'error';
|
|
169
|
-
} else if (minValue > max) {
|
|
170
|
-
break;
|
|
171
|
-
} else if (interval <= 1 && decimalPoint === 0) {
|
|
172
|
-
name = minValue;
|
|
173
175
|
}
|
|
174
176
|
|
|
175
177
|
this.addLegend({
|
|
176
|
-
cId:
|
|
177
|
-
color
|
|
178
|
+
cId: id,
|
|
179
|
+
color,
|
|
178
180
|
name,
|
|
179
181
|
show: true,
|
|
180
182
|
});
|
|
@@ -349,6 +349,7 @@ const modules = {
|
|
|
349
349
|
const series = Object.values(this.seriesList)[0];
|
|
350
350
|
|
|
351
351
|
let isShow = false;
|
|
352
|
+
let valueText = hitItem.formatted;
|
|
352
353
|
const { colorState, isGradient } = series;
|
|
353
354
|
if (isGradient) {
|
|
354
355
|
const { min, max } = series.valueOpt;
|
|
@@ -356,7 +357,9 @@ const modules = {
|
|
|
356
357
|
const { start, end } = colorState[0];
|
|
357
358
|
isShow = (start <= ratio && ratio <= end) || hitItem.o === -1;
|
|
358
359
|
} else {
|
|
359
|
-
|
|
360
|
+
const colorItem = colorState.find(({ id }) => id === hitItem.cId);
|
|
361
|
+
isShow = colorItem?.show;
|
|
362
|
+
valueText = colorItem?.label ?? valueText;
|
|
360
363
|
}
|
|
361
364
|
|
|
362
365
|
if (!isShow) {
|
|
@@ -392,7 +395,6 @@ const modules = {
|
|
|
392
395
|
|
|
393
396
|
const itemX = boxPadding.l + 2;
|
|
394
397
|
const itemY = boxPadding.t + TEXT_HEIGHT + 2;
|
|
395
|
-
const valueText = hitItem.formatted;
|
|
396
398
|
|
|
397
399
|
ctx.font = fontStyle;
|
|
398
400
|
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
<div>
|
|
34
34
|
<!--Level Depth-->
|
|
35
35
|
<span
|
|
36
|
-
v-if="cellIndex ===
|
|
36
|
+
v-if="cellIndex === expandColumnIdx"
|
|
37
37
|
:style="getDepthStyle(node.level)"
|
|
38
38
|
>
|
|
39
39
|
</span>
|
|
40
40
|
<!--Expand Icon-->
|
|
41
41
|
<span
|
|
42
|
-
v-if="cellIndex ===
|
|
42
|
+
v-if="cellIndex === expandColumnIdx"
|
|
43
43
|
:class="{
|
|
44
44
|
expand: node.expand,
|
|
45
45
|
'ev-tree-toggle': true
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
</span>
|
|
64
64
|
<!--Data Icon-->
|
|
65
65
|
<span
|
|
66
|
-
v-if="cellIndex ===
|
|
66
|
+
v-if="cellIndex === expandColumnIdx && isDataIcon"
|
|
67
67
|
:title="node[column.field]"
|
|
68
68
|
:class="{
|
|
69
69
|
expand: node.expand,
|
|
@@ -179,6 +179,10 @@ export default {
|
|
|
179
179
|
const childIconMV = computed(() => (props.childIcon || 'tree-child-icon'));
|
|
180
180
|
const isDataIcon = computed(() => ((parentIconMV.value !== 'none' || childIconMV.value !== 'none')));
|
|
181
181
|
|
|
182
|
+
const expandColumnIdx = computed(() => {
|
|
183
|
+
const expandColumnIndex = props.orderedColumns.findIndex(v => v.expandColumn);
|
|
184
|
+
return expandColumnIndex > 0 ? expandColumnIndex : 0;
|
|
185
|
+
});
|
|
182
186
|
const getRowClass = nodeInfo => ({
|
|
183
187
|
row: true,
|
|
184
188
|
'tree-row': true,
|
|
@@ -217,6 +221,7 @@ export default {
|
|
|
217
221
|
node,
|
|
218
222
|
isDataIcon,
|
|
219
223
|
checkboxClass,
|
|
224
|
+
expandColumnIdx,
|
|
220
225
|
onCheck,
|
|
221
226
|
onExpand,
|
|
222
227
|
onClick,
|