Skip to content

Commit 46f8a17

Browse files
committed
Fix coloring
1 parent 7242108 commit 46f8a17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/waffle-chart/src/CdcWaffleChart.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,8 @@ const WaffleChart = ({ config, isEditor, link = '', showConfigConfirm, updateCon
500500
x: calculatePos(shape, 'x', i, nodeWidthNum, nodeSpacerNum, columns, rows),
501501
y: calculatePos(shape, 'y', i, nodeWidthNum, nodeSpacerNum, columns, rows),
502502
color: config.visual.colors[theme],
503-
opacity: i + 1 > 100 - Math.round(Number(dataPercentage)) ? 1 : 0.2,
504-
isFilled: i + 1 > 100 - Math.round(Number(dataPercentage))
503+
opacity: isFilled ? 1 : 0.2,
504+
isFilled: isFilled
505505
}
506506
waffleData.push(newNode)
507507
}

0 commit comments

Comments
 (0)