Skip to content

Commit ee7faee

Browse files
committed
fix a bug
and domain, otherwise when all contribution's count is 0, it will be light green, not gray.
1 parent 7fc9bf9 commit ee7faee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GithubContributionGraphExample/ContentView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct ContentView: View {
2424
content
2525
.aspectRatio(aspectRatio, contentMode: .fit)
2626
}
27-
.chartForegroundStyleScale(range: Gradient(colors: colors))
27+
.chartForegroundStyleScale(domain: 0...10, range: Gradient(colors: colors))
2828
.chartXAxis {
2929
AxisMarks(position: .top, values: .stride(by: .month)) {
3030
AxisValueLabel(format: .dateTime.month())

0 commit comments

Comments
 (0)