feat(card): show top 7 languages on donut cards instead of top 5 (#14)

Legend at x=20-155 fits 7 rows (y=55 to y=175); donut at cx=250, cy=110
is unaffected. Update the design-guidelines table to match. Stress test
still passes — the legend column never leaves its left-side gutter.
This commit is contained in:
2026-04-19 10:13:07 +07:00
committed by GitHub
parent 72fcba7963
commit d1034e6883
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ Cap rows at what fits: up to 7 rows per card. Stats splits commits into lifetime
| Donut centre | `(250, 110)` |
| Outer radius | 55 |
| Inner radius | 30 |
| Top-N entries shown | 5 (overflow collapses into "Other") |
| Top-N entries shown | 7 (overflow collapses into "Other") |
| Slice stroke | `theme.Background`, 1.5 px (gap between slices) |
| Legend origin | `(20, 55)` |
| Legend row height | 20 px |
+1 -1
View File
@@ -16,7 +16,7 @@ func renderDonutCard(title string, stats []github.LangStat, t theme.Theme) []byt
const (
width = 340
height = 200
topN = 5
topN = 7
cx = 250 // donut centre x
cy = 110 // donut centre y
outerR = 55.0 // donut outer radius