package
Circular progress indicator using SVG
npm install progress-svgGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 3 packages.
4.7 kB
Includes dependencies.
Circular progress indicator using SVG because, unlike canvas, SVG can be easilly styled with CSS.
With your favourite package manager:
packin add jkroso/progress-svgcomponent install jkroso/progress-svgnpm install progress-svgthen in your app:
var Progress = require('progress-svg')The Progress class. The progress circle will automatically center itself within whatever element you put it. In the example below it will be displayed in the middle of the document.
var progress = new Progress
document.body.appendChild(progress.el)Set the size of the circle in pixels. The default is 100
progress.size(40)update the display to show n percent completion
progress.update(50)set the text to be placed in the center of the progress circle
progress.text('%d percent') // '50 percent'