evui 3.3.15 → 3.3.16
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 +200 -90
- package/dist/evui.common.js.map +1 -1
- package/dist/evui.umd.js +200 -90
- 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 +2 -2
- package/src/components/chart/element/element.bar.js +8 -1
- package/src/components/chart/uses.js +1 -0
package/package.json
CHANGED
|
@@ -189,8 +189,8 @@ class EvChart {
|
|
|
189
189
|
break;
|
|
190
190
|
}
|
|
191
191
|
case 'bar': {
|
|
192
|
-
const { thickness, borderRadius } = this.options;
|
|
193
|
-
series.draw({ thickness, borderRadius, showSeriesCount, showIndex, ...opt });
|
|
192
|
+
const { thickness, cPadRatio, borderRadius } = this.options;
|
|
193
|
+
series.draw({ thickness, cPadRatio, borderRadius, showSeriesCount, showIndex, ...opt });
|
|
194
194
|
if (series.show) {
|
|
195
195
|
showIndex++;
|
|
196
196
|
}
|
|
@@ -67,7 +67,14 @@ class Bar {
|
|
|
67
67
|
|
|
68
68
|
const dArea = isHorizontal ? yArea : xArea;
|
|
69
69
|
const cArea = dArea / (this.data.length || 1);
|
|
70
|
-
|
|
70
|
+
|
|
71
|
+
let cPad;
|
|
72
|
+
const isUnableToDrawCategoryPadding = param.cPadRatio >= 1 || param.cPadRatio <= 0;
|
|
73
|
+
if (isUnableToDrawCategoryPadding) {
|
|
74
|
+
cPad = 2;
|
|
75
|
+
} else {
|
|
76
|
+
cPad = Math.max((dArea * (param.cPadRatio / 2)) / this.data.length, 2);
|
|
77
|
+
}
|
|
71
78
|
|
|
72
79
|
let bArea;
|
|
73
80
|
let w;
|