mirror of
https://github.com/tiennm99/ghstats.git
synced 2026-09-01 04:19:52 +00:00
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:
@@ -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 |
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user