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 committed Jan 23, 2025
1 parent 95dc368 commit d0613a3
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 d0613a3

Please sign in to comment.