evui 3.3.57 → 3.3.59
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 +28 -5
- package/dist/evui.common.js +121 -130
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +121 -130
- 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.bar.js +3 -11
- package/src/components/chart/element/element.heatmap.js +21 -10
- package/src/components/chart/element/element.line.js +4 -3
- package/src/components/grid/Grid.vue +12 -12
- package/src/components/grid/style/grid.scss +1 -0
package/package.json
CHANGED
|
@@ -115,7 +115,7 @@ class Bar {
|
|
|
115
115
|
this.chartRect = chartRect;
|
|
116
116
|
this.labelOffset = labelOffset;
|
|
117
117
|
this.borderRadius = param.borderRadius;
|
|
118
|
-
this.
|
|
118
|
+
this.filteredCount = totalCount;
|
|
119
119
|
|
|
120
120
|
let categoryPoint = null;
|
|
121
121
|
|
|
@@ -304,11 +304,7 @@ class Bar {
|
|
|
304
304
|
const item = { data: null, hit: false, color: this.color };
|
|
305
305
|
const gdata = this.data;
|
|
306
306
|
|
|
307
|
-
|
|
308
|
-
const [min, max] = this.range ?? [];
|
|
309
|
-
if (truthyNumber(min) && truthyNumber(max)) {
|
|
310
|
-
totalCount = (max - min) + 1;
|
|
311
|
-
}
|
|
307
|
+
const totalCount = this.filteredCount ?? gdata.length;
|
|
312
308
|
|
|
313
309
|
let s = 0;
|
|
314
310
|
let e = totalCount - 1;
|
|
@@ -350,11 +346,7 @@ class Bar {
|
|
|
350
346
|
const item = { data: null, hit: false, color: this.color };
|
|
351
347
|
const gdata = this.data;
|
|
352
348
|
|
|
353
|
-
|
|
354
|
-
const [min, max] = this.range ?? [];
|
|
355
|
-
if (truthyNumber(min) && truthyNumber(max)) {
|
|
356
|
-
totalCount = (max - min) + 1;
|
|
357
|
-
}
|
|
349
|
+
const totalCount = this.filteredCount ?? gdata.length;
|
|
358
350
|
|
|
359
351
|
let s = 0;
|
|
360
352
|
let e = totalCount - 1;
|
|
@@ -250,6 +250,11 @@ class HeatMap {
|
|
|
250
250
|
this.size.w = xArea / minmaxX.oriSteps;
|
|
251
251
|
this.size.h = yArea / minmaxY.oriSteps;
|
|
252
252
|
|
|
253
|
+
this.filterdCount = {
|
|
254
|
+
x: minmaxX.oriSteps,
|
|
255
|
+
y: minmaxY.oriSteps,
|
|
256
|
+
};
|
|
257
|
+
|
|
253
258
|
const getOpacity = (item, opacity, index) => {
|
|
254
259
|
if (!legendHitInfo) {
|
|
255
260
|
let isDownplay;
|
|
@@ -337,14 +342,14 @@ class HeatMap {
|
|
|
337
342
|
|
|
338
343
|
xp += axisLineWidth;
|
|
339
344
|
|
|
340
|
-
this.drawItem(ctx, xp, yp, w, h, borderOpt);
|
|
341
|
-
ctx.restore();
|
|
342
|
-
|
|
343
345
|
item.xp = xp;
|
|
344
346
|
item.yp = yp;
|
|
345
347
|
item.w = w;
|
|
346
348
|
item.h = h;
|
|
347
349
|
|
|
350
|
+
this.drawItem(ctx, xp, yp, w, h, borderOpt);
|
|
351
|
+
ctx.restore();
|
|
352
|
+
|
|
348
353
|
if (this.showValue.use) {
|
|
349
354
|
this.drawValueLabels({
|
|
350
355
|
context: ctx,
|
|
@@ -479,16 +484,17 @@ class HeatMap {
|
|
|
479
484
|
} else {
|
|
480
485
|
isShow = this.colorState.find(({ id }) => id === cId)?.show;
|
|
481
486
|
}
|
|
487
|
+
|
|
482
488
|
ctx.save();
|
|
483
489
|
ctx.shadowOffsetX = 0;
|
|
484
490
|
ctx.shadowOffsetY = 0;
|
|
485
491
|
ctx.shadowBlur = 4;
|
|
486
492
|
|
|
487
493
|
if (x !== null && y !== null && isShow) {
|
|
488
|
-
const color = gdata.dataColor;
|
|
494
|
+
const color = Util.colorStringToRgba(gdata.dataColor);
|
|
489
495
|
ctx.shadowColor = Util.colorStringToRgba('#959494');
|
|
490
|
-
ctx.strokeStyle =
|
|
491
|
-
ctx.fillStyle =
|
|
496
|
+
ctx.strokeStyle = color;
|
|
497
|
+
ctx.fillStyle = color;
|
|
492
498
|
|
|
493
499
|
if (this.stroke.show) {
|
|
494
500
|
const { lineWidth } = this.stroke;
|
|
@@ -500,6 +506,7 @@ class HeatMap {
|
|
|
500
506
|
h -= (lineWidth);
|
|
501
507
|
}
|
|
502
508
|
}
|
|
509
|
+
|
|
503
510
|
this.drawItem(ctx, x - 0.5, y - 0.5, w + 1, h + 1, this.stroke);
|
|
504
511
|
|
|
505
512
|
ctx.restore();
|
|
@@ -552,6 +559,7 @@ class HeatMap {
|
|
|
552
559
|
|
|
553
560
|
findBlockRange({ xcp, xep, ycp, yep, range }) {
|
|
554
561
|
const labels = this.labels;
|
|
562
|
+
const axesLineWidth = 1;
|
|
555
563
|
|
|
556
564
|
const blockRange = {
|
|
557
565
|
xsp: Math.min(xcp, xep),
|
|
@@ -561,9 +569,12 @@ class HeatMap {
|
|
|
561
569
|
};
|
|
562
570
|
|
|
563
571
|
if (labels.x.length && labels.y.length) {
|
|
572
|
+
const labelXCount = this.filterdCount?.x ?? labels.x.length;
|
|
573
|
+
const labelYCount = this.filterdCount?.y ?? labels.y.length;
|
|
574
|
+
|
|
564
575
|
const { x1, x2, y1, y2 } = range;
|
|
565
|
-
const gapX = (x2 - x1) /
|
|
566
|
-
const gapY = (y2 - y1) /
|
|
576
|
+
const gapX = (x2 - x1) / labelXCount;
|
|
577
|
+
const gapY = (y2 - y1) / labelYCount;
|
|
567
578
|
|
|
568
579
|
const point = {
|
|
569
580
|
xsp: xcp,
|
|
@@ -579,14 +590,14 @@ class HeatMap {
|
|
|
579
590
|
|
|
580
591
|
if (dir === 'x') {
|
|
581
592
|
gap = gapX;
|
|
582
|
-
startPoint = x1;
|
|
593
|
+
startPoint = x1 + axesLineWidth;
|
|
583
594
|
} else {
|
|
584
595
|
gap = gapY;
|
|
585
596
|
startPoint = y1;
|
|
586
597
|
}
|
|
587
598
|
|
|
588
599
|
const findItem = labels[dir].findIndex((item, index) => {
|
|
589
|
-
itemPoint =
|
|
600
|
+
itemPoint = startPoint + (gap * index);
|
|
590
601
|
return itemPoint <= target && target <= itemPoint + gap;
|
|
591
602
|
});
|
|
592
603
|
|
|
@@ -182,18 +182,19 @@ class Line {
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
// Draw points
|
|
185
|
-
if (!isBrush
|
|
185
|
+
if (!isBrush) {
|
|
186
186
|
ctx.strokeStyle = Util.colorStringToRgba(mainColor, mainColorOpacity);
|
|
187
187
|
const focusStyle = Util.colorStringToRgba(pointFillColor, 1);
|
|
188
188
|
const blurStyle = Util.colorStringToRgba(pointFillColor, pointFillColorOpacity);
|
|
189
189
|
|
|
190
190
|
this.data.forEach((curr, ix) => {
|
|
191
|
-
const isSelectedLabel = selectedLabelIndexList.includes(ix);
|
|
192
191
|
if (curr.xp === null || curr.yp === null) {
|
|
193
192
|
return;
|
|
194
193
|
}
|
|
195
194
|
|
|
196
|
-
|
|
195
|
+
const isSingle = this.data[ix - 1]?.o === null && this.data[ix + 1]?.o === null;
|
|
196
|
+
const isSelectedLabel = selectedLabelIndexList.includes(ix);
|
|
197
|
+
if (this.point || isSingle || isSelectedLabel) {
|
|
197
198
|
ctx.fillStyle = isSelectedLabel && !legendHitInfo ? focusStyle : blurStyle;
|
|
198
199
|
Canvas.drawPoint(ctx, this.pointStyle, this.pointSize, curr.xp, curr.yp);
|
|
199
200
|
}
|
|
@@ -82,7 +82,6 @@
|
|
|
82
82
|
'margin-right': (orderedColumns.length - 1 === index
|
|
83
83
|
&& hasVerticalScrollBar && hasHorizontalScrollBar) ? `${scrollWidth}px` : '0px',
|
|
84
84
|
}"
|
|
85
|
-
@click.stop="onSort(column)"
|
|
86
85
|
>
|
|
87
86
|
<!-- Filter Status -->
|
|
88
87
|
<span
|
|
@@ -95,20 +94,21 @@
|
|
|
95
94
|
<span
|
|
96
95
|
:title="column.caption"
|
|
97
96
|
class="column-name"
|
|
97
|
+
@click.stop="onSort(column)"
|
|
98
98
|
>
|
|
99
99
|
{{ column.caption }}
|
|
100
|
+
<!-- Sort Icon -->
|
|
101
|
+
<template v-if="sortField === column.field">
|
|
102
|
+
<ev-icon
|
|
103
|
+
v-if="sortOrder === 'desc'"
|
|
104
|
+
icon="ev-icon-triangle-down"
|
|
105
|
+
/>
|
|
106
|
+
<ev-icon
|
|
107
|
+
v-if="sortOrder === 'asc'"
|
|
108
|
+
icon="ev-icon-triangle-up"
|
|
109
|
+
/>
|
|
110
|
+
</template>
|
|
100
111
|
</span>
|
|
101
|
-
<!-- Sort Icon -->
|
|
102
|
-
<template v-if="sortField === column.field">
|
|
103
|
-
<ev-icon
|
|
104
|
-
v-if="sortOrder === 'desc'"
|
|
105
|
-
icon="ev-icon-triangle-down"
|
|
106
|
-
/>
|
|
107
|
-
<ev-icon
|
|
108
|
-
v-if="sortOrder === 'asc'"
|
|
109
|
-
icon="ev-icon-triangle-up"
|
|
110
|
-
/>
|
|
111
|
-
</template>
|
|
112
112
|
<!-- Filter Button -->
|
|
113
113
|
<span
|
|
114
114
|
v-if="isFiltering"
|