Skip to content

Latest commit

 

History

History
219 lines (177 loc) · 16.2 KB

File metadata and controls

219 lines (177 loc) · 16.2 KB

🚀 Dynamic Progress Bar

Generates a dynamic progress bar image (SVG) using Python, deployed freely via Vercel.

📊 Preview:

Progress Progress Progress

Inspired by fredericojordan/progress-bar.


🔥 Other Projects

  • Star Rating Dynamic Star Rating - GoulartNogueira/Star-Rating

🛠️ Usage

This service is deployed on Vercel and accessible via the domain progress-bar.xyz.


⚙️ Parameters

🔧 Parameter 📜 Description 🎯 Default Value
title Adds a title to the progress bar None
scale The maximum value that the progress bar represents 100
prefix A string to add before the progress number None
suffix A string to add after the progress number %
width The width of the progress bar in pixels 100
color The color of the progress bar (hex code without #) 00ff00 (green)
progress_background The background color of the progress bar (hex code without #) ffffff (white)
progress_number_color The color of the progress number (hex code without #) ffffff (white)
progress_color The color of the progress bar (hex code without #) Depends on percentage
show_text Whether to display or hide the progress text true
style The style. One of: default, flat, square, plastic, for-the-badge default

Examples

Below are several examples showcasing different ways to generate progress bars.

📌 Preview 🌐 URL
Progress https://progress-bar.xyz/28/
Progress https://progress-bar.xyz/28/?title=progress
Progress https://progress-bar.xyz/58/
Progress https://progress-bar.xyz/58/?title=completed
Progress https://progress-bar.xyz/91/
Progress https://progress-bar.xyz/91/?title=done
Progress https://progress-bar.xyz/180/?scale=10&title=mark&prefix=R$&suffix=
Progress https://progress-bar.xyz/420/?scale=500&title=funds&width=200&color=babaca&prefix=R$&suffix=
Progress https://progress-bar.xyz/7/?scale=10&title=mark&suffix=X
Progress https://progress-bar.xyz/420/?scale=500&title=funds&width=200&color=babaca&suffix=$
Progress https://progress-bar.xyz/58/?title=colorful&progress_background=ffc0cb&progress_number_color=000
Progress https://progress-bar.xyz/100/?progress_color=ff3300
Progress https://progress-bar.xyz/100/?width=100&title=Fixed+color&progress_color=ff3300
Progress https://progress-bar.xyz/28/?show_text=false
Progress https://progress-bar.xyz/90/?show_text=false
Progress from JSON https://progress-bar.xyz/dynamic/json/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fguibranco%2Fprogressbar%2Fmain%2Fdocs%2Fdynamic-json-sample.json&query=demo.metrics.translationPercent&title=JSON%20Demo
Progress from JSON https://progress-bar.xyz/dynamic/json/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fguibranco%2Fprogressbar%2Fmain%2Fdocs%2Fdynamic-json-sample.json&query=demo.metrics.translationPercent

🎨 Styles

We currently support:

🎨 Style 📌 Preview 🌐 URL
🟢 flat (default) Progress https://progress-bar.xyz/100/?style=flat
🔲 square Progress https://progress-bar.xyz/100/?style=square
🛡️ plastic Progress https://progress-bar.xyz/100/?style=plastic
🔖 for-the-badge Progress https://progress-bar.xyz/100/?style=for-the-badge
🎭 thin-rounded (WIP) Progress https://progress-bar.xyz/100/?style=thin-rounded
🪞 neo-glass (WIP) Progress https://progress-bar.xyz/100/?style=neo-glass
🎨 minimal-matte (WIP) Progress https://progress-bar.xyz/100/?style=minimal-matte

📡 Progress from a JSON URL

Besides a fixed value in the path (/75/), you can load the number from a remote JSON file.

Sample JSON file: https://raw.githubusercontent.com/guibranco/progressbar/main/docs/dynamic-json-sample.json

Use query parameters:

Parameter Description
url Required. Address of the JSON document (http or https). Must be URL-encoded in the query string.
query Required. JSONPath (e.g. $.items[0].metrics.pct) or dot form from the root (e.g. items.0.metrics.pct).
cache Optional. Cache-Control max-age in seconds. Default: none (header not set unless provided and > 0).

Any other parameters from the table above (title, scale, style, …) apply the same way as on /{number}/.


🚀 Deployment

Deploy this project to Vercel with a single click:

Deploy with Vercel


🤝 Contributing

Check out CONTRIBUTING.md to learn how to contribute!

👥 Contributors

guibranco
Guilherme Branco Stracini
nimble-turtle
nimble-turtle
ztest95
ztest95
Pointbr8ker-123
David Nwosu
EduardoBaptista01
Eduardo Baptista
bhosley
bhosley

🤖 Bots

dependabot[bot]
dependabot[bot]
github-actions[bot]
github-actions[bot]
penify-dev[bot]
penify-dev[bot]
deepsource-autofix[bot]
deepsource-autofix[bot]
snyk-bot
Snyk bot

📜 License

This project is licensed under the MIT License.

📄 See LICENSE for details.