fix(style): axis tick value too long

This commit is contained in:
jialin
2025-07-16 16:33:22 +08:00
parent a1c6eb177a
commit 32ba5e1802
+3 -3
View File
@@ -1,4 +1,4 @@
import { throttle } from 'lodash';
import _, { throttle } from 'lodash';
import React, {
forwardRef,
useEffect,
@@ -84,13 +84,13 @@ const Chart: React.FC<{
const yAxis: any[] = [{}, {}];
if (counts[0] < unifiedCount) {
yAxis[0].max = newMax0;
yAxis[0].max = _.round(newMax0, 2);
yAxis[0].interval = intervals[0];
yAxis[0].splitNumber = unifiedCount;
}
if (counts[1] < unifiedCount) {
yAxis[1].max = newMax1;
yAxis[1].max = _.round(newMax1, 2);
yAxis[1].interval = intervals[1];
yAxis[1].splitNumber = unifiedCount;
}