Skip to content

feat: add hide_stats option for Top Languages card#4850

Open
claw-explorer wants to merge 1 commit into
anuraghazra:masterfrom
claw-explorer:feat/hide-stats-values
Open

feat: add hide_stats option for Top Languages card#4850
claw-explorer wants to merge 1 commit into
anuraghazra:masterfrom
claw-explorer:feat/hide-stats-values

Conversation

@claw-explorer

Copy link
Copy Markdown

Summary

This PR adds a new hide_stats query parameter for the Top Languages card that hides the percentage/byte display values while keeping progress bars and chart visualizations intact.

Motivation

Addresses #1708 — users want the ability to show language names and their visual proportions without displaying the numeric values. The existing hide_progress option hides both the progress bars and the stats values. This new option hides only the numeric values while preserving the visual representation.

Changes

  • Added hide_stats boolean parameter to the Top Languages card API
  • Updated all layout renderers (normal, compact, donut, donut-vertical, pie) to support the option
  • Added TypeScript type definition
  • Added 3 new tests covering compact, normal, and donut layouts
  • Updated README documentation

Usage

![Top Langs](https://github-readme-stats.vercel.app/api/top-langs/?username=anuraghazra&hide_stats=true)

Works with all layouts:

&layout=compact&hide_stats=true
&layout=donut&hide_stats=true
&layout=pie&hide_stats=true

Testing

All 245 existing tests pass. 3 new tests added covering the hide_stats option across compact, normal, and donut layouts.

Resolves #1708

Add a new `hide_stats` query parameter that hides percentage/byte
values while keeping progress bars and chart visualizations.

This addresses users who want a cleaner card appearance showing only
language names and their visual proportions without numeric values.

The option works across all layouts: normal, compact, donut,
donut-vertical, and pie.

Resolves anuraghazra#1708
@claw-explorer claw-explorer requested a review from qwerty541 as a code owner April 1, 2026 10:44
@vercel

vercel Bot commented Apr 1, 2026

Copy link
Copy Markdown

@claw-explorer is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added documentation Improvements or additions to documentation. lang-card Issues related to the language card. dependencies Pull requests that update a dependency file labels Apr 1, 2026
martin-mfg added a commit to stats-organization/github-stats-extended that referenced this pull request Apr 25, 2026
based on anuraghazra#4850 by
@claw-explorer

This PR adds a new hide_values query parameter for the Top Languages
card that hides the percentage/byte display values while keeping
progress bars and chart visualizations intact.

<img width="300" height="245" alt="top-langs5"
src="https://github.com/user-attachments/assets/6c7486c3-5611-41c0-95ff-0d9183cea320"
/>
<img width="300" height="350" alt="top-langs"
src="https://github.com/user-attachments/assets/a0cc5bed-3f8e-4934-9c30-3e7d5a240865"
/>
<img width="350" height="215" alt="top-langs2"
src="https://github.com/user-attachments/assets/9d9c06cc-aa0d-4e47-9cdd-bce298583742"
/>
<img width="300" height="350" alt="top-langs3"
src="https://github.com/user-attachments/assets/f4a51889-0b8f-4289-a082-e2107208a123"
/>
<img width="300" height="140" alt="top-langs4"
src="https://github.com/user-attachments/assets/d88c2ea2-0422-482b-aade-8cf5799f12cd"
/>
@martin-mfg

Copy link
Copy Markdown
Contributor

I have added this feature to github-stats-extended via stats-organization#181. It will be available after the next release.

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation. lang-card Issues related to the language card.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Top Languages Card API option for not display numbers

2 participants