PHP Classes

File: public/flat-admin/js/plugins/easy-pie-chart/jquery.easy-pie-chart.min.js

Recommend this page to a friend!
  Classes of adriano123456   Budget System   public/flat-admin/js/plugins/easy-pie-chart/jquery.easy-pie-chart.min.js   Download  
File: public/flat-admin/js/plugins/easy-pie-chart/jquery.easy-pie-chart.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Budget System
Elaborate budgets for purchases of products
Author: By
Last change:
Date: 15 days ago
Size: 3,320 bytes
 

Contents

Class file image Download
// Generated by CoffeeScript 1.3.3 /* Easy pie chart is a jquery plugin to display simple animated pie charts for only one value Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. Built on top of the jQuery library (http://jquery.com) @source: http://github.com/rendro/easy-pie-chart/ @autor: Robert Fleischmann @version: 1.0.1 Inspired by: http://dribbble.com/shots/631074-Simple-Pie-Charts-II?list=popular&offset=210 Thanks to Philip Thrasher for the jquery plugin boilerplate for coffee script */(function(){(function(e){e.easyPieChart=function(t,n){var r,i,s,o,u,a,f,l=this;this.el=t;this.$el=e(t);this.$el.data("easyPieChart",this);this.init=function(){var t;l.options=e.extend({},e.easyPieChart.defaultOptions,n);t=parseInt(l.$el.data("percent"),10);l.percentage=0;l.canvas=e("<canvas width='"+l.options.size+"' height='"+l.options.size+"'></canvas>").get(0);l.$el.append(l.canvas);typeof G_vmlCanvasManager!="undefined"&&G_vmlCanvasManager!==null&&G_vmlCanvasManager.initElement(l.canvas);l.ctx=l.canvas.getContext("2d");l.ctx.translate(l.options.size/2,l.options.size/2);l.$el.addClass("easyPieChart");l.$el.css({width:l.options.size,height:l.options.size,lineHeight:""+l.options.size+"px"});l.update(t);return l};this.update=function(e){return l.options.animate===!1?s(e):i(l.percentage,e)};a=function(){var e,t,n;l.ctx.fillStyle=l.options.scaleColor;l.ctx.lineWidth=1;n=[];for(e=t=0;t<=24;e=++t)n.push(r(e));return n};r=function(e){var t;t=e%6===0?0:l.options.size*.017;l.ctx.save();l.ctx.rotate(e*Math.PI/12);l.ctx.fillRect(l.options.size/2-t,0,-l.options.size*.05+t,1);return l.ctx.restore()};f=function(){var e;e=l.options.size/2-l.options.lineWidth/2;l.options.scaleColor!==!1&&(e-=l.options.size*.08);l.ctx.beginPath();l.ctx.arc(0,0,e,0,Math.PI*2,!0);l.ctx.closePath();l.ctx.strokeStyle=l.options.trackColor;l.ctx.lineWidth=l.options.lineWidth;return l.ctx.stroke()};u=function(){l.options.scaleColor!==!1&&a();if(l.options.trackColor!==!1)return f()};s=function(t){var n;u();l.ctx.strokeStyle=e.isFunction(l.options.barColor)?l.options.barColor(t):l.options.barColor;l.ctx.lineCap=l.options.lineCap;n=l.options.size/2-l.options.lineWidth/2;l.options.scaleColor!==!1&&(n-=l.options.size*.08);l.ctx.save();l.ctx.rotate(-Math.PI/2);l.ctx.beginPath();l.ctx.arc(0,0,n,0,Math.PI*2*t/100,!1);l.ctx.stroke();return l.ctx.restore()};i=function(e,t){var n,r,i;r=30;i=r*l.options.animate/1e3;n=0;l.options.onStart.call(l);l.percentage=t;if(l.animation){clearInterval(l.animation);l.animation=!1}return l.animation=setInterval(function(){l.ctx.clearRect(-l.options.size/2,-l.options.size/2,l.options.size,l.options.size);u.call(l);s.call(l,[o(n,e,t-e,i)]);n++;if(n/i>1){clearInterval(l.animation);l.animation=!1;return l.options.onStop.call(l)}},1e3/r)};o=function(e,t,n,r){e/=r/2;return e<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t};return this.init()};e.easyPieChart.defaultOptions={barColor:"#ef1e25",trackColor:"#f2f2f2",scaleColor:"#dfe0e0",lineCap:"round",size:110,lineWidth:3,animate:!1,onStart:e.noop,onStop:e.noop};e.fn.easyPieChart=function(t){return e.each(this,function(n,r){var i;i=e(r);if(!i.data("easyPieChart"))return i.data("easyPieChart",new e.easyPieChart(r,t))})};return void 0})(jQuery)}).call(this);