heatmap and SVG
Windowing#
services/heatmap_window.py slices dailyContributions to all, last_365, or year. Comment in the file: it mirrors CodeTrace/src/api/unifiedClient.ts::windowUnifiedHeatmap.
Aliases accepted: 365, last365, last365days, days, last_year. Passing year with view=all becomes view=year. Unknown view, or view=year without year, is HTTP 400.
Windowed fields (totalSubmissions, streaks, dailyContributions, startDate, endDate) describe the slice. yearlyContributions and availableYears always describe full history so a year picker still has every year.
Canonical build_heatmap windows with ("all", None) then the route windows again from query params. The legacy heatmap dict on the same response has a smaller local _window_heatmap that does not recompute currentStreak. Read data if you care about streaks.
SVG card#
GET /{username}/stats/svg?theme=dark
GET /{username}/stats/svg?theme=light&exclude=Arrays,Strings
stats_svg.py renders image/svg+xml. Accent #ffa116. Cache-Control: public, max-age=86400, s-maxage=86400. Middleware stores that 24h TTL instead of the default hour. Missing user is an error SVG at HTTP 404, max-age=300.
exclude drops topic bars by name. Themes are dark (default) and light.