IonicaBizau / git-stats

🍀 Local git statistics including GitHub-like contributions calendars.
MIT License
6.42k stars 183 forks source link

fix: Display top contributors correctly when larger than chart #182

Closed DenverCoder1 closed 2 years ago

DenverCoder1 commented 2 years ago

Fixes a major bug in the authors graph where if there are many contributors, only contributors from the bottom of the list get displayed.

This corrects the list to show the top contributors and "others" when the number of contributors is larger than the chart.

Fixes #178 Fixes #126

Example of old chart (wrong)

Does not display "others" and only shows contributors with below 1% of contributions. Top contributors are missing.

image

Example of fixed chart

Number of contributors displayed is based on the diameter of the chart. "Others" will always be shown when the number of contributors exceeds the maximum.

image

DenverCoder1 commented 2 years ago

@IonicaBizau Mind taking a look at this? I've rebased the PR and resolved conflicts after the recent changes.

Thanks!