fix(dashboard): make donut tooltip readable
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 7s
All checks were successful
Deploy to Production / Trigger production update (push) Successful in 7s
Theme tokens are oklch(); wrapping them in hsl(var(--card)) produced an invalid, transparent tooltip background so the label blended into the card. Use the oklch vars directly and force readable text colour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -336,12 +336,16 @@ function ClusterNodesSection({ nodeStats }: { nodeStats: Rec[] }) {
|
||||
))}
|
||||
</Pie>
|
||||
<Tooltip
|
||||
// Theme vars are oklch(); wrapping them in hsl() yields an
|
||||
// invalid (transparent) colour, so reference them directly.
|
||||
contentStyle={{
|
||||
background: 'hsl(var(--card))',
|
||||
border: '1px solid hsl(var(--border))',
|
||||
background: 'var(--popover)',
|
||||
border: '1px solid var(--border)',
|
||||
borderRadius: 8,
|
||||
fontSize: 11,
|
||||
color: 'var(--popover-foreground)',
|
||||
}}
|
||||
itemStyle={{ color: 'var(--popover-foreground)' }}
|
||||
formatter={(v: number, name: string) => [`${v}%`, name]}
|
||||
/>
|
||||
<Legend
|
||||
|
||||
Reference in New Issue
Block a user