https://github.com/component/progress
Circular progress indicator using Canvas
https://github.com/component/progress
Last synced: 8 months ago
JSON representation
Circular progress indicator using Canvas
- Host: GitHub
- URL: https://github.com/component/progress
- Owner: component
- Created: 2012-08-10T18:49:25.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-10-09T23:40:40.000Z (over 12 years ago)
- Last Synced: 2025-04-03T07:05:27.898Z (12 months ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 30
- Watchers: 3
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# Progress
Circular progress indicator using canvas.

## Installation
```
$ npm install progress-component
```
## Example
```js
var Progress = require('progress');
var progress = new Progress;
document.body.appendChild(progress.el);
var n = 0;
var id = setInterval(function(){
if (n == 100) clearInterval(id);
progress.update(n++);
}, 50);
```
## API
### Progress#update(n)
Update the indicator to `n` and re-draw.
### Progress#font(family)
Change the font to `family`.
### Progress#fontSize(n)
Change the font size to `n`.
### Progress#size(n)
Change the indicator diameter to `n`, defaults to 50.
## License
MIT