From 96f9f8062453a17643a41401f1ece59336592bea Mon Sep 17 00:00:00 2001 From: Valentyn Diduryk Date: Wed, 2 Sep 2015 19:49:52 +0300 Subject: [PATCH] added posibility to set initial value of chart --- src/easypiechart.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/easypiechart.js b/src/easypiechart.js index 0dc3822..5e7c113 100644 --- a/src/easypiechart.js +++ b/src/easypiechart.js @@ -9,6 +9,7 @@ var EasyPieChart = function(el, opts) { trackWidth: undefined, size: 110, rotate: 0, + currentValue: 0, animate: { duration: 1000, enabled: true @@ -60,6 +61,8 @@ var EasyPieChart = function(el, opts) { } } + currentValue = parseFloat(options.currentValue); + // check for jQuery easing if (typeof(options.easing) === 'string' && typeof(jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) { options.easing = jQuery.easing[options.easing];