fix(style): top users bar name too long

This commit is contained in:
jialin
2025-06-27 16:42:24 +08:00
parent abdd5e08a6
commit d26ea28028
2 changed files with 10 additions and 7 deletions
+3 -6
View File
@@ -45,12 +45,9 @@ const BarChart: React.FC<ChartProps> = (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: {
+7 -1
View File
@@ -286,7 +286,13 @@ export const getRightRenderContent = (opts: {
{!collapsed && (
<span
className="m-l-8 font-size-14"
style={{ fontWeight: 'var(--font-weight-normal)' }}
style={{
fontWeight: 'var(--font-weight-normal)',
maxWidth: 100,
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
}}
>
{opts.initialState?.currentUser?.username}
</span>