Your IP : 216.73.217.80


Current Path : /home/jlgagfroyt/www/AAOLD/templates/yoo_digit/js/
Upload File :
Current File : /home/jlgagfroyt/www/AAOLD/templates/yoo_digit/js/circlechart.js

/* Copyright (C) YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */

!function(t,e){var i=['<svg class="uk-circlechart" preserveAspectRatio="xMinYMin meet" xmlns="http://www.w3.org/2000/svg">',"<path />",'<circle cx="90" cy="90" r="60"/>','<text x="50%" y="50%"></text>',"</svg>"].join(""),s=function(n,r){var a=this;if(this.element=t(n),this.options=t.extend({},s.defaults,r),!this.element.data("circle")){var c=t(i),o=this.options.size,h=o/2;this.element.replaceWith(c),this.element=c.attr({width:o,height:o,viewbox:"0 0 "+[o,o].join(" ")}),this.circle=this.element.find("circle").attr({cx:h,cy:h,r:h-this.options.border}),this.border=this.element.find("path").attr("transform","translate("+[h,h].join(",")+")"),this.text=this.element.find("text"),this.update(0),this.element.on("inview.uk.scrollspy",function(){var t=0;(function e(){t>100||t>a.options.maxPercent||(a.update(t++),setTimeout(e,20))})()}),this.scrollspy=new e.scrollspy(this.element),this.element.data("circle",this)}};t.extend(s.prototype,{update:function(t){var e=100==t?359.9999:360*(t/100),i=this.options.size/2;e%=360;var s=e*Math.PI/180,n=Math.sin(s)*i,r=Math.cos(s)*-i,a=e>180?1:0,c="M 0 0 v -"+i+" A "+i+" "+i+" 0 "+a+" 1 "+n+" "+r+" z";this.border.attr("d",c),this.text.text(Math.ceil(t)+"%")}}),s.defaults={timerSeconds:5,callback:function(){},timerCurrent:0,showPercentage:!0,maxPercent:100,size:180,border:10},t(document).ready(function(i){t("[data-uk-circle-chart]").each(function(){var i,n=t(this);n.data("circle")||(i=new s(n,e.Utils.options(n.attr("data-uk-circle-chart"))))})})}(jQuery,jQuery.UIkit);