Address CodeRabbit review on system resources widget PR

- Render the chart tooltip via a portal so it isn't clipped by the
  card's overflow:hidden (needed to stop the chart line itself
  bleeding past its rounded corners).
- Move chartColumns' width breakpoints into a lookup table and
  memoize the computed value, instead of an inline ternary.
This commit is contained in:
Bergasha committed 2026-08-27 10:46:04 +10:00
1 parent 26d12d9fad
commit 73de83b48f
2 files changed
+19 -2

No files matched your search

@@ -127,7 +127,12 @@ export const CommonChart = ({
},
}}
tooltipAnimationDuration={200}
tooltipProps={tooltipProps}
tooltipProps={{
// Render via portal so the tooltip isn't clipped by the card's overflow:hidden
// (needed to stop the chart line itself bleeding past its rounded corners).
portal: typeof document !== "undefined" ? document.body : undefined,
...tooltipProps,
}}
withTooltip={height >= 64}
yAxisProps={yAxisProps}
fillOpacity={chartType === "area" ? 0.3 : undefined}