From 32ba5e1802f344d0d6a0560129752555f123c68c Mon Sep 17 00:00:00 2001 From: jialin Date: Wed, 16 Jul 2025 16:31:50 +0800 Subject: [PATCH] fix(style): axis tick value too long --- src/components/echarts/chart.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/echarts/chart.tsx b/src/components/echarts/chart.tsx index d3856254..d7572b5a 100644 --- a/src/components/echarts/chart.tsx +++ b/src/components/echarts/chart.tsx @@ -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; }