Skip to content

Commit 157a563

Browse files
committed
Fix scale color in ContributionChart
1 parent a1d799b commit 157a563

File tree

2 files changed

+229
-227
lines changed

2 files changed

+229
-227
lines changed

components/ContributionChart.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ function Legend({ count }) {
136136

137137
function scaleColor(count, maxContribution) {
138138
const varingScalingFactor =
139-
count < 10 ? 10 / MAX_SCALE : maxContribution.count / MAX_SCALE;
139+
maxContribution.count < 10
140+
? 10 / MAX_SCALE
141+
: maxContribution.count / MAX_SCALE;
140142
return Math.max(
141143
Math.min(Math.ceil(count / varingScalingFactor), MAX_SCALE),
142144
0

0 commit comments

Comments
 (0)