Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Canvas pie chart
JavaScript HTML Makefile CSS
Tag: 0.0.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
Makefile
Readme.md
component.json
example.html
index.js
package.json
pie.css

Readme.md

pie

Pie charts for component/piecon inspired by the original piecon. Styled with CSS!

Installation

$ component install component/pie

Styling

Pie utilizes component/style to enable CSS styling for Canvas rasters. For example the default style is:

.pie {
  color: #EC4E89;
  background: #bbb;
  border: 2px solid white;
}

API

new Pie([selector])

Initialize a new Pie with optional CSS selector used for styling, this defaults to ".pie".

Pie#update(n)

Update the percentage to n.

Pie#size(n)

Set the diameter to n.

Pie#draw(ctx)

Draw on ctx.

License

MIT

Something went wrong with that request. Please try again.