Skip to content

Commit 3eb7cd5

Browse files
committed
fix(webapp): preserve Recharts active dot rendering
1 parent 9ec0c01 commit 3eb7cd5

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

apps/webapp/app/components/primitives/charts/ChartLine.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -577,16 +577,18 @@ export function ChartLineRenderer({
577577
// flips at the split; otherwise it's the series colour. The warning overlay draws its
578578
// own dot on top where it's active.
579579
activeDot={
580-
gradientLine ? (
581-
<ThresholdActiveDot
582-
dataKey={key}
583-
threshold={thresholdStroke!.value}
584-
aboveColor={thresholdStroke!.aboveColor}
585-
baseColor={config[key]?.color ?? "var(--color-tasks)"}
586-
/>
587-
) : (
588-
{ r: 4, fill: config[key]?.color, strokeWidth: 0 }
589-
)
580+
gradientLine
581+
? // oxlint-disable-next-line react/no-unstable-nested-components -- Recharts invokes this renderer with hover coordinates; an element would rely on cloneElement prop injection.
582+
(props: ActiveDotProps) => (
583+
<ThresholdActiveDot
584+
{...props}
585+
dataKey={key}
586+
threshold={thresholdStroke!.value}
587+
aboveColor={thresholdStroke!.aboveColor}
588+
baseColor={config[key]?.color ?? "var(--color-tasks)"}
589+
/>
590+
)
591+
: { r: 4, fill: config[key]?.color, strokeWidth: 0 }
590592
}
591593
isAnimationActive={false}
592594
/>

0 commit comments

Comments
 (0)