https://github.com/component/piecon
Pie favicons -- great for upload progress etc
https://github.com/component/piecon
Last synced: 8 months ago
JSON representation
Pie favicons -- great for upload progress etc
- Host: GitHub
- URL: https://github.com/component/piecon
- Owner: component
- Created: 2012-09-20T19:54:35.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2015-03-16T21:12:49.000Z (about 11 years ago)
- Last Synced: 2024-12-13T00:44:49.887Z (over 1 year ago)
- Language: JavaScript
- Size: 119 KB
- Stars: 34
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# piecon
Pie charts for [component/favicon](https://github.com/component/favicon)
inspired by the original [piecon](https://github.com/lipka/piecon). Styled
with CSS!

## Installation
$ component install component/piecon
## Styling
Piecon utilizes [component/style](https://github.com/component/style)
to enable CSS styling for Canvas rasters. For example the default
style is:
```css
.pie {
color: #EC4E89;
background: #bbb;
border: 2px solid white;
}
```
## API
### new Piecon([selector])
Initialize a new `Piecon` with optional CSS `selector` used
for styling, this defaults to ".pie".
### Piecon#update(n)
Update the percentage to `n`, this will automatically
draw the pie and replace the favicon.
### Piecon#size(n)
Set the diameter to `n`.
### Piecon#reset()
Reset favicon.
# License
MIT