diff --git a/Readme.md b/Readme.md index e4b8c91..01ed7ee 100644 --- a/Readme.md +++ b/Readme.md @@ -1,3 +1,5 @@ +> Modified version that add the option to set the total value. So you can build pies with any units. (days, hours, %,...) + # easyPieChart > Lightweight plugin to render simple, animated and retina optimized pie charts diff --git a/dist/jquery.easypiechart.js b/dist/jquery.easypiechart.js index c2a4bcf..96a98f4 100644 --- a/dist/jquery.easypiechart.js +++ b/dist/jquery.easypiechart.js @@ -183,7 +183,7 @@ var CanvasRenderer = function(el, options) { } // draw bar - drawCircle(color, options.lineWidth, percent / 100); + drawCircle(color, options.lineWidth, percent / options.total); }.bind(this); /** @@ -212,6 +212,7 @@ var CanvasRenderer = function(el, options) { var EasyPieChart = function(el, opts) { var defaultOptions = { + total: 100, barColor: '#ef1e25', trackColor: '#f9f9f9', scaleColor: '#dfe0e0', diff --git a/docs/options.md b/docs/options.md index 9165d01..cd9d9a2 100644 --- a/docs/options.md +++ b/docs/options.md @@ -10,6 +10,11 @@ You can pass these options to the initialize function to set a custom look and f