Skip to content
osyra42Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Counter

HTML5 CSS3 JavaScript Chart.js License: MIT

A tiny browser app with 10 named tally counters. Increment or decrement each one, watch the running total update, and see the breakdown rendered live as a pie chart. Everything you enter is saved to your browser, so it survives a refresh.

Features

🔢 Ten independent tallies

Ten counters, each with its own + / - buttons and an editable number field. Decrement stops at zero (no negatives).

🏷️ Renamable labels

Every counter has an editable text label (Number 0, Number 1, …). Rename them to whatever you're counting.

📊 Live pie chart

A Chart.js pie chart updates on every change, showing each counter's share of the total with per-slice percentages in the tooltip.

🧮 Running total

A Total: readout sums all ten counters in real time.

💾 Automatic persistence

Numbers and labels are written to localStorage on change and restored on page load. No accounts, no backend.

🎨 Auto-generated colors

Slice and row colors are spread evenly across the HSL hue wheel, so each counter gets a distinct color.

Architecture

counter/
├── index.html    # Markup: counter container, total readout, pie chart canvas
├── script.js     # Counter generation, increment/decrement, total, chart, localStorage
└── styles.css    # Dark theme + mobile (max-width: 600px) layout

Tech Stack

Layer Technology
Markup HTML5
Styling CSS3 (dark theme, responsive)
Logic Vanilla JavaScript (no framework)
Charting Chart.js (via CDN)
Persistence Browser localStorage

No build step, no dependencies to install.

Usage / Local Development

Clone and open the page directly in a browser:

git clone https://github.com/osyra42/counter.git
cd counter

Then open index.html in your browser, or serve it locally:

python -m http.server 8000
# visit http://localhost:8000

Click + / - to count, rename the labels, and your state is saved automatically.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages