Skip to content

Commit

Permalink
[charts] Handle case where gradient stop offset could be Infinite (
Browse files Browse the repository at this point in the history
  • Loading branch information
JCQuintas authored Jan 11, 2025
1 parent e93f4d2 commit 769855d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ type ChartsPiecewiseGradientProps = {
export default function ChartsPiecewiseGradient(props: ChartsPiecewiseGradientProps) {
const { isReversed, gradientId, size, direction, scale, colorMap } = props;

if (size <= 0) {
return null;
}

return (
<linearGradient
id={gradientId}
Expand Down

0 comments on commit 769855d

Please sign in to comment.