diff --git a/src/components/echarts/h-bar.tsx b/src/components/echarts/h-bar.tsx index 52c1a79d..4fc3d481 100644 --- a/src/components/echarts/h-bar.tsx +++ b/src/components/echarts/h-bar.tsx @@ -55,17 +55,18 @@ const BarChart: React.FC = (props) => { show: true, overflow: 'truncate', width: 75, - ellipsis: '...' - // formatter(value: string, index: number) { - // return `{a|${index + 1}}`; - // }, - // rich: { - // a: { - // fontWeight: 500, - // fontSize: 14, - // color: token?.colorTextSecondary - // } - // } + ellipsis: '...', + margin: 12, + formatter(value: string, index: number) { + return `{a|${index + 1}}`; + }, + rich: { + a: { + fontWeight: 500, + fontSize: 14, + color: token?.colorTextSecondary + } + } } }, legend: { @@ -81,9 +82,9 @@ const BarChart: React.FC = (props) => { type: 'bar', barWidth: 20, stack: 'Ad', - barGap: '30%', + barGap: '20%', label: { - show: false, + show: true, formatter(params: any) { if (params.seriesIndex === 0) { return `{value|${params.name}}`; @@ -172,6 +173,7 @@ const BarChart: React.FC = (props) => { ) : (