/* */ ;(function($,global){ var data = [ { startValue: 0.40, stopValue: 0.05, increaseValue: -35 / 10000, size: 9, startFill: '#ffa100', endFill: '#ffc766', emptyFill: 'rgba(255, 218, 153, 0.5)' }, { startValue: 0.50, stopValue: 0.25, increaseValue: -25 / 10000, size: 5, startFill: '#7ab800', endFill: '#afd466', emptyFill: 'rgba(202, 227, 153, 0.5)' }, { startValue: 0.10, stopValue: 0.70, increaseValue: 60 / 10000, size: 1, startFill: '#0098db', endFill: '#66c1e9', emptyFill: 'rgba(153, 214, 241, 0.5)' }, { startValue: 0.50, stopValue: 0.10, increaseValue: -40 / 10000, size: 9, startFill: '#ffa100', endFill: '#ffc766', emptyFill: 'rgba(255, 218, 153, 0.5)' }, { startValue: 0.45, stopValue: 0.70, increaseValue: 25 / 10000, size: 5, startFill: '#7ab800', endFill: '#afd466', emptyFill: 'rgba(202, 227, 153, 0.5)' }, { startValue: 0.05, stopValue: 0.20, increaseValue: 15 / 10000, size: 1, startFill: '#0098db', endFill: '#66c1e9', emptyFill: 'rgba(153, 214, 241, 0.5)' } ] var Heatmap = function() { }; Heatmap.prototype.init = function(){ //chceck if heatmap is available var $parent = $('.activity-circles'); if(!$parent.length)return; /** * jquery-circle-progress - jQuery Plugin to draw animated circular progress bars: * {@link http://kottenator.github.io/jquery-circle-progress/} * * @author Rostyslav Bryzgunov * @version 1.2.1 * @licence MIT * @preserve */ !function(i){if("function"==typeof define&&define.amd)define(["jquery"],i);else if("object"==typeof module&&module.exports){var t=require("jquery");i(t),module.exports=t}else i(jQuery)}(function(i){function t(i){this.init(i)}t.prototype={value:0,size:100,startAngle:-Math.PI,thickness:"auto",fill:{gradient:["#3aeabb","#fdd250"]},emptyFill:"rgba(0, 0, 0, .1)",animation:{duration:1200,easing:"circleProgressEasing"},animationStartValue:0,reverse:!1,lineCap:"butt",insertMode:"prepend",constructor:t,el:null,canvas:null,ctx:null,radius:0,arcFill:null,lastFrameValue:0,init:function(t){i.extend(this,t),this.radius=this.size/2,this.initWidget(),this.initFill(),this.draw(),this.el.trigger("circle-inited")},initWidget:function(){this.canvas||(this.canvas=i("")["prepend"==this.insertMode?"prependTo":"appendTo"](this.el)[0]);var t=this.canvas;if(t.width=this.size,t.height=this.size,this.ctx=t.getContext("2d"),window.devicePixelRatio>1){var e=window.devicePixelRatio;t.style.width=t.style.height=this.size+"px",t.width=t.height=this.size*e,this.ctx.scale(e,e)}},initFill:function(){function t(){var t=i("")[0];t.width=e.size,t.height=e.size,t.getContext("2d").drawImage(g,0,0,r,r),e.arcFill=e.ctx.createPattern(t,"no-repeat"),e.drawFrame(e.lastFrameValue)}var e=this,a=this.fill,n=this.ctx,r=this.size;if(!a)throw Error("The fill is not specified!");if("string"==typeof a&&(a={color:a}),a.color&&(this.arcFill=a.color),a.gradient){var s=a.gradient;if(1==s.length)this.arcFill=s[0];else if(s.length>1){for(var l=a.gradientAngle||0,o=a.gradientDirection||[r/2*(1-Math.cos(l)),r/2*(1+Math.sin(l)),r/2*(1+Math.cos(l)),r/2*(1-Math.sin(l))],h=n.createLinearGradient.apply(n,o),c=0;c