mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(site): display tooltip in bars for app usage chart (#13854)
This commit is contained in:
@@ -480,19 +480,25 @@ const TemplateUsagePanel: FC<TemplateUsagePanelProps> = ({
|
||||
{usage.display_name}
|
||||
</div>
|
||||
</div>
|
||||
<LinearProgress
|
||||
value={percentage}
|
||||
variant="determinate"
|
||||
css={{
|
||||
width: "100%",
|
||||
height: 8,
|
||||
backgroundColor: theme.palette.divider,
|
||||
"& .MuiLinearProgress-bar": {
|
||||
backgroundColor: usageColors[i],
|
||||
borderRadius: 999,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
<Tooltip
|
||||
title={`${Math.floor(percentage)}%`}
|
||||
placement="top"
|
||||
arrow
|
||||
>
|
||||
<LinearProgress
|
||||
value={percentage}
|
||||
variant="determinate"
|
||||
css={{
|
||||
width: "100%",
|
||||
height: 8,
|
||||
backgroundColor: theme.palette.divider,
|
||||
"& .MuiLinearProgress-bar": {
|
||||
backgroundColor: usageColors[i],
|
||||
borderRadius: 999,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Tooltip>
|
||||
<Stack
|
||||
spacing={0}
|
||||
css={{
|
||||
|
||||
@@ -455,6 +455,9 @@ export const components = {
|
||||
background: theme.palette.divider,
|
||||
padding: "8px 16px",
|
||||
}),
|
||||
arrow: ({ theme }) => ({
|
||||
color: theme.palette.divider,
|
||||
}),
|
||||
},
|
||||
},
|
||||
MuiAlert: {
|
||||
|
||||
Reference in New Issue
Block a user