diff --git a/src/components/echarts/h-bar.tsx b/src/components/echarts/h-bar.tsx index 3719d1c9..96fd900e 100644 --- a/src/components/echarts/h-bar.tsx +++ b/src/components/echarts/h-bar.tsx @@ -45,12 +45,9 @@ const BarChart: React.FC = (props) => { ...yAxis, axisLabel: { ...yAxis.axisLabel, - formatter(value: string) { - if (value.length > 10) { - return `${value.slice(0, 10)}...`; - } - return value; - } + overflow: 'truncate', + width: 60, + ellipsis: '...' } }, legend: { diff --git a/src/layouts/rightRender.tsx b/src/layouts/rightRender.tsx index 1ab6317d..10589465 100644 --- a/src/layouts/rightRender.tsx +++ b/src/layouts/rightRender.tsx @@ -286,7 +286,13 @@ export const getRightRenderContent = (opts: { {!collapsed && ( {opts.initialState?.currentUser?.username}