Skip to content

Commit

Permalink
fix missing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Mar 28, 2024
1 parent 077dfac commit 91e0d49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function ChartsAxesGradients() {
if (colorMap?.type === 'piecewise') {
return (
<ChartsPiecewiseGradient
key={gradientId}
isReveresed={!reverse}
scale={scale}
colorMap={colorMap}
Expand All @@ -43,6 +44,7 @@ export function ChartsAxesGradients() {
if (colorMap?.type === 'continuous') {
return (
<ChartsContinuousGradient
key={gradientId}
isReveresed={!reverse}
scale={scale}
colorScale={colorScale!}
Expand All @@ -63,6 +65,7 @@ export function ChartsAxesGradients() {
if (colorMap?.type === 'piecewise') {
return (
<ChartsPiecewiseGradient
key={gradientId}
isReveresed={reverse}
scale={scale}
colorMap={colorMap}
Expand All @@ -75,6 +78,7 @@ export function ChartsAxesGradients() {
if (colorMap?.type === 'continuous') {
return (
<ChartsContinuousGradient
key={gradientId}
isReveresed={reverse}
scale={scale}
colorScale={colorScale!}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default function ChartsContinuousGradient(props: ChartsContinuousGradient
const keyPrefix = `${extremValues[0]}-${extremValues[1]}-`;
return (
<linearGradient
key={gradientId}
id={gradientId}
x1="0"
x2="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default function ChartsPiecewiseGradient(props: ChartsPiecewiseGradientPr

return (
<linearGradient
key={gradientId}
id={gradientId}
x1="0"
x2="0"
Expand All @@ -33,7 +32,7 @@ export default function ChartsPiecewiseGradient(props: ChartsPiecewiseGradientPr
const offset = isReveresed ? 1 - x / size : x / size;

return (
<React.Fragment>
<React.Fragment key={threshold.toString() + index}>
<stop offset={offset} stopColor={colorMap.colors[index]} stopOpacity={1} />
<stop offset={offset} stopColor={colorMap.colors[index + 1]} stopOpacity={1} />
</React.Fragment>
Expand Down

0 comments on commit 91e0d49

Please sign in to comment.