Skip to content

Top Languages Card

The top languages card shows your most frequently used languages.

Copy-paste this code into your readme and change the links.

Endpoint: api/top-langs?username=xu756

[![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756)](https://github.com/stats-organization/github-stats-extended)

You can customize the appearance and behavior of the top languages card using the common options and exclusive options listed in the table below.

NameDescriptionTypeDefault value
hideHides the specified languages from card.string (comma-separated values)null
hide_titleHides the title of your card.booleanfalse
layoutSwitches between five available layouts normal & compact & donut & donut-vertical & pie.enumnormal
card_widthSets the card’s width manually.number300
langs_countShows more languages on the card, between 1-20.integer5 for normal and donut, 6 for other layouts
exclude_repoExcludes specified repositories.string (comma-separated values)null
roleInclude repositories where the user has one of the specified roles (OWNER, ORGANIZATION_MEMBER, COLLABORATOR).string (comma-separated values)OWNER
custom_titleSets a custom title for the card.stringMost Used Languages
disable_animationsDisables all animations in the card.booleanfalse
prog_bar_bg_color1Background color of the bars. (Applies only to normal layout.)string (hex color)#ddd
hide_progressUses the compact layout option, hides percentages, and removes the bars.booleanfalse
hide_valuesHides language percentages or bytes while keeping the progress bars or chart.booleanfalse
size_weightConfigures language stats algorithm (see Language stats algorithm).integer1
count_weightConfigures language stats algorithm (see Language stats algorithm).integer0
stats_formatSwitches between two available formats for language’s stats percentages and bytes.enumpercentages

1: Supports light and dark mode via prog_bar_bg_color_light and prog_bar_bg_color_dark.

We use the following algorithm to calculate the languages percentages on the language card:

ranking_index = (byte_count ^ size_weight) * (repo_count ^ count_weight);

By default, only the byte count is used for determining the languages percentages shown on the language card (i.e. size_weight=1 and count_weight=0). You can, however, use the &size_weight= and &count_weight= options to weight the language usage calculation. The values must be positive real numbers. More details about the algorithm can be found here.

  • &size_weight=1&count_weight=0 - (default) Orders by byte count.
  • &size_weight=0.5&count_weight=0.5 - (recommended) Uses both byte and repo count for ranking
    • &size_weight=0&count_weight=1 - Orders by repo count
![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756&size_weight=0.5&count_weight=0.5)

If the percentages still look wrong to you, these two comments cover most of the reasons why, and are worth reading before opening an issue:

You can use the &exclude_repo=repo1,repo2 parameter to exclude individual repositories.

![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756&exclude_repo=github-readme-stats,xu756.github.io)

You can use &hide=language1,language2 parameter to hide individual languages.

![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756&hide=javascript,html)

Language names with spaces or symbols need to be percent-encoded, so Jupyter Notebook becomes &hide=jupyter%20notebook and C++ becomes &hide=c%2B%2B.

You can use the &langs_count= option to increase or decrease the number of languages shown on the card. Valid values are integers between 1 and 20 (inclusive). By default it was set to 5 for normal & donut and 6 for other layouts.

![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756&langs_count=8)

You can use the &layout=compact option to change the card design.

![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756&layout=compact)

You can use the &layout=donut option to change the card design.

[![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756&layout=donut)](https://github.com/stats-organization/github-stats-extended)

You can use the &layout=donut-vertical option to change the card design.

[![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756&layout=donut-vertical)](https://github.com/stats-organization/github-stats-extended)

You can use the &layout=pie option to change the card design.

[![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756&layout=pie)](https://github.com/stats-organization/github-stats-extended)

You can use the &hide_progress=true option to hide the percentages and the progress bars (layout will be automatically set to compact).

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

You can use the &stats_format=bytes option to display the stats in bytes instead of percentage.

![Top Langs](https://github-stats-extended.vercel.app/api/top-langs/?username=xu756&stats_format=bytes)

Top LangsTop Langs

Top LangsTop Langs

Top LangsTop Langs

Top LangsTop Langs

Top LangsTop Langs

Top LangsTop Langs

Top LangsTop Langs