mirror of
https://github.com/tiennm99/ghstats.git
synced 2026-05-17 08:59:22 +00:00
feat(card): add contributions area chart card
New 5-contributions.svg renders the last year's contribution calendar as a monthly smooth-filled area chart. Pure Go SVG; no extra API calls — one additional contributionCalendar.weeks block in the existing profile GraphQL query carries the data. - Y-axis mirrored on both sides with nice ticks. - X-axis labels in YY/MM format, every other month to avoid overlap. - Smooth curve via Catmull-Rom interpolation converted to cubic Bezier (d3.curveCatmullRom default tension 0.5). - Missing months between first and last are inserted as zero-count so the chart stays time-continuous.
This commit is contained in:
@@ -30,7 +30,15 @@ query($login: String!, $after: String) {
|
||||
totalPullRequestReviewContributions
|
||||
totalRepositoryContributions
|
||||
restrictedContributionsCount
|
||||
contributionCalendar { totalContributions }
|
||||
contributionCalendar {
|
||||
totalContributions
|
||||
weeks {
|
||||
contributionDays {
|
||||
contributionCount
|
||||
date
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories(
|
||||
first: 100
|
||||
|
||||
Reference in New Issue
Block a user