Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Circular progress indicator using Canvas
JavaScript
Tag: 0.0.4

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.npmignore
History.md
Makefile
Readme.md
component.json
index.js
package.json

Readme.md

Progress

Circular progress indicator using canvas.

js progress indicator component

Installation

$ npm install progress-component

Example

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

Something went wrong with that request. Please try again.