# easy-pie-chart
> Lightweight plugin to render simple, animated and retina optimized pie charts
![Version](http://img.shields.io/version/2.1.7.png?color=green)
[![Build Status](https://travis-ci.org/rendro/easy-pie-chart.png)](https://travis-ci.org/rendro/easy-pie-chart)
[![Dependencies Status](https://david-dm.org/rendro/easy-pie-chart/dev-status.png)](https://david-dm.org/rendro/easy-pie-chart)
[![Analytics](https://ga-beacon.appspot.com/UA-46840672-1/easy-pie-chart/readme)](https://github.com/igrigorik/ga-beacon)
## Features
[![](https://github.com/rendro/easy-pie-chart/raw/master/demo/img/easy-pie-chart.png)](http://drbl.in/ezuc)
* highly customizable
* very easy to implement
* resolution independent (retina optimized)
* uses `requestAnimationFrame` for smooth animations on modern devices and
* works in all modern browsers, even in IE7+ with [excanvas](https://code.google.com/p/explorercanvas/wiki/Instructions)
#### framework support
* Vanilla JS *(no dependencies)* (~872 bytes)
* jQuery plugin (~921 bytes)
* Angular Module (~983 bytes)
## Get started
#### Installation
You can also use [bower](http://bower.io) to install the component:
```
$ bower install jquery.easy-pie-chart
```
#### jQuery
To use the easy pie chart plugin you need to load the current version of jQuery (> 1.6.4) and the source of the plugin.
```html
Property (Type) |
Default |
Description |
barColor |
#ef1e25 |
The color of the curcular bar. You can either pass a valid css color string, or a function that takes the current percentage as a value and returns a valid css color string. |
trackColor |
#f2f2f2 |
The color of the track, or false to disable rendering. |
scaleColor |
#dfe0e0 |
The color of the scale lines, false to disable rendering. |
scaleLength |
5 |
Length of the scale lines (reduces the radius of the chart). |
lineCap |
round |
Defines how the ending of the bar line looks like. Possible values are: butt , round and square . |
lineWidth |
3 |
Width of the chart line in px. |
size |
110 |
Size of the pie chart in px. It will always be a square. |
rotate |
0 |
Rotation of the complete chart in degrees. |
animate |
object |
Object with time in milliseconds and boolean for an animation of the bar growing ({ duration: 1000, enabled: true } ), or false to deactivate animations. |
easing |
defaultEasing |
Easing function or string with the name of a jQuery easing function |
## Callbacks
All callbacks will only be called if `animate` is not `false`.