fix(style): top users bar name too long
This commit is contained in:
@@ -45,12 +45,9 @@ const BarChart: React.FC<ChartProps> = (props) => {
|
|||||||
...yAxis,
|
...yAxis,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
...yAxis.axisLabel,
|
...yAxis.axisLabel,
|
||||||
formatter(value: string) {
|
overflow: 'truncate',
|
||||||
if (value.length > 10) {
|
width: 60,
|
||||||
return `${value.slice(0, 10)}...`;
|
ellipsis: '...'
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
|
|||||||
@@ -286,7 +286,13 @@ export const getRightRenderContent = (opts: {
|
|||||||
{!collapsed && (
|
{!collapsed && (
|
||||||
<span
|
<span
|
||||||
className="m-l-8 font-size-14"
|
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}
|
{opts.initialState?.currentUser?.username}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user