text: !function(e){var i=10,s=.95;var t={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:1.5,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(e,i){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+i.color+";'>"+e+"<br/>"+Math.round(i.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};e.plot.plugins.push({init:function(t){var r=null,a=null,l=null,n=null,o=null,p=null,h=!1,g=null,c=[];function u(i,s,t){h||(h=!0,r=i.getCanvas(),a=e(r).parent(),l=i.getOptions(),i.setData(function(i){for(var s=0,t=0,r=0,a=l.series.pie.combine.color,n=[],o=0;o<i.length;++o){var p=i[o].data;e.isArray(p)&&1==p.length&&(p=p[0]),e.isArray(p)?!isNaN(parseFloat(p[1]))&&isFinite(p[1])?p[1]=+p[1]:p[1]=0:p=!isNaN(parseFloat(p))&&isFinite(p)?[1,+p]:[1,0],i[o].data=[p]}for(var o=0;o<i.length;++o)s+=i[o].data[0][1];for(var o=0;o<i.length;++o){var p=i[o].data[0][1];p/s<=l.series.pie.combine.threshold&&(t+=p,r++,a||(a=i[o].color))}for(var o=0;o<i.length;++o){var p=i[o].data[0][1];(r<2||p/s>l.series.pie.combine.threshold)&&n.push(e.extend(i[o],{data:[[1,p]],color:i[o].color,label:i[o].label,angle:p*Math.PI*2/s,percent:p/(s/100)}))}return r>1&&n.push({data:[[1,t]],color:a,label:l.series.pie.combine.label,angle:t*Math.PI*2/s,percent:t/(s/100)}),n}(i.getData())))}function d(t,r){if(a){var c=t.getPlaceholder().width(),u=t.getPlaceholder().height(),d=a.children().filter(".legend").children().width()||0;g=r,h=!1,n=Math.min(c,u/l.series.pie.tilt)/2,p=u/2+l.series.pie.offset.top,o=c/2,"auto"==l.series.pie.offset.left?(l.legend.position.match("w")?o+=d/2:o-=d/2,o<n?o=n:o>c-n&&(o=c-n)):o+=l.series.pie.offset.left;var v=t.getData(),b=0;do{b>0&&(n*=s),b+=1,w(),l.series.pie.tilt<=.8&&k()}while(!M()&&b<i);b>=i&&(w(),a.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),t.setSeries&&t.insertLegend&&(t.setSeries(v),t.insertLegend())}function w(){g.clearRect(0,0,c,u),a.children().filter(".pieLabel, .pieLabelBackground").remove()}function k(){var e=l.series.pie.shadow.left,i=l.series.pie.shadow.top,s=l.series.pie.shadow.alpha,t=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius;if(!(t>=c/2-e||t*l.series.pie.tilt>=u/2-i||t<=10)){g.save(),g.translate(e,i),g.globalAlpha=s,g.fillStyle="#000",g.translate(o,p),g.scale(1,l.series.pie.tilt);for(var r=1;r<=10;r++)g.beginPath(),g.arc(0,0,t,0,2*Math.PI,!1),g.fill(),t-=r;g.restore()}}function M(){var i=Math.PI*l.series.pie.startAngle,s=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius;g.save(),g.translate(o,p),g.scale(1,l.series.pie.tilt),g.save();for(var t=i,r=0;r<v.length;++r)v[r].startAngle=t,h(v[r].angle,v[r].color,!0);if(g.restore(),l.series.pie.stroke.width>0){for(g.save(),g.lineWidth=l.series.pie.stroke.width,t=i,r=0;r<v.length;++r)h(v[r].angle,l.series.pie.stroke.color,!1);g.restore()}return f(g),g.restore(),!l.series.pie.label.show||function(){for(var s=i,t=l.series.pie.label.radius>1?l.series.pie.label.radius:n*l.series.pie.label.radius,r=0;r<v.length;++r){if(v[r].percent>=100*l.series.pie.label.threshold&&!h(v[r],s,r))return!1;s+=v[r].angle}return!0;function h(i,s,r){if(0==i.data[0][1])return!0;var n,h=l.legend.labelFormatter,g=l.series.pie.label.formatter;n=h?h(i.label,i):i.label,g&&(n=g(n,i));var d=(s+i.angle+s)/2,f=o+Math.round(Math.cos(d)*t),v=p+Math.round(Math.sin(d)*t)*l.series.pie.tilt,b="<span class='pieLabel' id='pieLabel"+r+"' style='position:absolute;top:"+v+"px;left:"+f+"px;'>"+n+"</span>";a.append(b);var w=a.children("#pieLabel"+r),k=v-w.height()/2,M=f-w.width()/2;if(w.css("top",k),w.css("left",M),0-k>0||0-M>0||u-(k+w.height())<0||c-(M+w.width())<0)return!1;if(0!=l.series.pie.label.background.opacity){var P=l.series.pie.label.background.color;null==P&&(P=i.color);var A="top:"+k+"px;left:"+M+"px;";e("<div class='pieLabelBackground' style='position:absolute;width:"+w.width()+"px;height:"+w.height()+"px;"+A+"background-color:"+P+";'></div>").css("opacity",l.series.pie.label.background.opacity).insertBefore(w)}return!0}}();function h(e,i,r){e<=0||isNaN(e)||(r?g.fillStyle=i:(g.strokeStyle=i,g.lineJoin="round"),g.beginPath(),Math.abs(e-2*Math.PI)>1e-9&&g.moveTo(0,0),g.arc(0,0,s,t,t+e/2,!1),g.arc(0,0,s,t+e/2,t+e,!1),g.closePath(),t+=e,r?g.fill():g.stroke())}}}function f(e){if(l.series.pie.innerRadius>0){e.save();var i=l.series.pie.innerRadius>1?l.series.pie.innerRadius:n*l.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=l.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=l.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.stroke(),e.closePath(),e.restore()}}function v(e,i){for(var s=!1,t=-1,r=e.length,a=r-1;++t<r;a=t)(e[t][1]<=i[1]&&i[1]<e[a][1]||e[a][1]<=i[1]&&i[1]<e[t][1])&&i[0]<(e[a][0]-e[t][0])*(i[1]-e[t][1])/(e[a][1]-e[t][1])+e[t][0]&&(s=!s);return s}function b(e){k("plothover",e)}function w(e){k("plotclick",e)}function k(e,i){var s=t.offset(),r=function(e,i){for(var s,r,a=t.getData(),l=t.getOptions(),h=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius,c=0;c<a.length;++c){var u=a[c];if(u.pie.show){if(g.save(),g.beginPath(),g.moveTo(0,0),g.arc(0,0,h,u.startAngle,u.startAngle+u.angle/2,!1),g.arc(0,0,h,u.startAngle+u.angle/2,u.startAngle+u.angle,!1),g.closePath(),s=e-o,r=i-p,g.isPointInPath){if(g.isPointInPath(e-o,i-p))return g.restore(),{datapoint:[u.percent,u.data],dataIndex:0,series:u,seriesIndex:c}}else if(v([[0,0],[h*Math.cos(u.startAngle),h*Math.sin(u.startAngle)],[h*Math.cos(u.startAngle+u.angle/4),h*Math.sin(u.startAngle+u.angle/4)],[h*Math.cos(u.startAngle+u.angle/2),h*Math.sin(u.startAngle+u.angle/2)],[h*Math.cos(u.startAngle+u.angle/1.5),h*Math.sin(u.startAngle+u.angle/1.5)],[h*Math.cos(u.startAngle+u.angle),h*Math.sin(u.startAngle+u.angle)]],[s,r]))return g.restore(),{datapoint:[u.percent,u.data],dataIndex:0,series:u,seriesIndex:c};g.restore()}}return null}(parseInt(i.pageX-s.left),parseInt(i.pageY-s.top));if(l.grid.autoHighlight)for(var h=0;h<c.length;++h){var u=c[h];u.auto!=e||r&&u.series==r.series||M(u.series)}r&&function(e,i){var s=P(e);-1==s?(c.push({series:e,auto:i}),t.triggerRedrawOverlay()):i||(c[s].auto=!1)}(r.series,e);var d={pageX:i.pageX,pageY:i.pageY};a.trigger(e,[d,r])}function M(e){null==e&&(c=[],t.triggerRedrawOverlay());var i=P(e);-1!=i&&(c.splice(i,1),t.triggerRedrawOverlay())}function P(e){for(var i=0;i<c.length;++i)if(c[i].series==e)return i;return-1}t.hooks.processOptions.push(function(e,i){i.series.pie.show&&(i.grid.show=!1,"auto"==i.series.pie.label.show&&(i.legend.show?i.series.pie.label.show=!1:i.series.pie.label.show=!0),"auto"==i.series.pie.radius&&(i.series.pie.label.show?i.series.pie.radius=.75:i.series.pie.radius=1),i.series.pie.tilt>1?i.series.pie.tilt=1:i.series.pie.tilt<0&&(i.series.pie.tilt=0))}),t.hooks.bindEvents.push(function(e,i){var s=e.getOptions();s.series.pie.show&&(s.grid.hoverable&&i.unbind("mousemove").mousemove(b),s.grid.clickable&&i.unbind("click").click(w))}),t.hooks.processDatapoints.push(function(e,i,s,t){e.getOptions().series.pie.show&&u(e)}),t.hooks.drawOverlay.push(function(e,i){e.getOptions().series.pie.show&&function(e,i){var s=e.getOptions(),t=s.series.pie.radius>1?s.series.pie.radius:n*s.series.pie.radius;i.save(),i.translate(o,p),i.scale(1,s.series.pie.tilt);for(var r=0;r<c.length;++r)a(c[r].series);function a(e){e.angle<=0||isNaN(e.angle)||(i.fillStyle="rgba(255, 255, 255, "+s.series.pie.highlight.opacity+")",i.beginPath(),Math.abs(e.angle-2*Math.PI)>1e-9&&i.moveTo(0,0),i.arc(0,0,t,e.startAngle,e.startAngle+e.angle/2,!1),i.arc(0,0,t,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),i.closePath(),i.fill())}f(i),i.restore()}(e,i)}),t.hooks.draw.push(function(e,i){e.getOptions().series.pie.show&&d(e,i)})},options:t,name:"pie",version:"1.1"})}(jQuery);!function(e){var i=10,s=.95;var t={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:1.5,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(e,i){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+i.color+";'>"+e+"<br/>"+Math.round(i.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};e.plot.plugins.push({init:function(t){var r=null,a=null,l=null,n=null,o=null,p=null,h=!1,g=null,c=[];function u(i,s,t){h||(h=!0,r=i.getCanvas(),a=e(r).parent(),l=i.getOptions(),i.setData(function(i){for(var s=0,t=0,r=0,a=l.series.pie.combine.color,n=[],o=0;o<i.length;++o){var p=i[o].data;e.isArray(p)&&1==p.length&&(p=p[0]),e.isArray(p)?!isNaN(parseFloat(p[1]))&&isFinite(p[1])?p[1]=+p[1]:p[1]=0:p=!isNaN(parseFloat(p))&&isFinite(p)?[1,+p]:[1,0],i[o].data=[p]}for(var o=0;o<i.length;++o)s+=i[o].data[0][1];for(var o=0;o<i.length;++o){var p=i[o].data[0][1];p/s<=l.series.pie.combine.threshold&&(t+=p,r++,a||(a=i[o].color))}for(var o=0;o<i.length;++o){var p=i[o].data[0][1];(r<2||p/s>l.series.pie.combine.threshold)&&n.push(e.extend(i[o],{data:[[1,p]],color:i[o].color,label:i[o].label,angle:p*Math.PI*2/s,percent:p/(s/100)}))}return r>1&&n.push({data:[[1,t]],color:a,label:l.series.pie.combine.label,angle:t*Math.PI*2/s,percent:t/(s/100)}),n}(i.getData())))}function d(t,r){if(a){var c=t.getPlaceholder().width(),u=t.getPlaceholder().height(),d=a.children().filter(".legend").children().width()||0;g=r,h=!1,n=Math.min(c,u/l.series.pie.tilt)/2,p=u/2+l.series.pie.offset.top,o=c/2,"auto"==l.series.pie.offset.left?(l.legend.position.match("w")?o+=d/2:o-=d/2,o<n?o=n:o>c-n&&(o=c-n)):o+=l.series.pie.offset.left;var v=t.getData(),b=0;do{b>0&&(n*=s),b+=1,w(),l.series.pie.tilt<=.8&&k()}while(!M()&&b<i);b>=i&&(w(),a.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),t.setSeries&&t.insertLegend&&(t.setSeries(v),t.insertLegend())}function w(){g.clearRect(0,0,c,u),a.children().filter(".pieLabel, .pieLabelBackground").remove()}function k(){var e=l.series.pie.shadow.left,i=l.series.pie.shadow.top,s=l.series.pie.shadow.alpha,t=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius;if(!(t>=c/2-e||t*l.series.pie.tilt>=u/2-i||t<=10)){g.save(),g.translate(e,i),g.globalAlpha=s,g.fillStyle="#000",g.translate(o,p),g.scale(1,l.series.pie.tilt);for(var r=1;r<=10;r++)g.beginPath(),g.arc(0,0,t,0,2*Math.PI,!1),g.fill(),t-=r;g.restore()}}function M(){var i=Math.PI*l.series.pie.startAngle,s=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius;g.save(),g.translate(o,p),g.scale(1,l.series.pie.tilt),g.save();for(var t=i,r=0;r<v.length;++r)v[r].startAngle=t,h(v[r].angle,v[r].color,!0);if(g.restore(),l.series.pie.stroke.width>0){for(g.save(),g.lineWidth=l.series.pie.stroke.width,t=i,r=0;r<v.length;++r)h(v[r].angle,l.series.pie.stroke.color,!1);g.restore()}return f(g),g.restore(),!l.series.pie.label.show||function(){for(var s=i,t=l.series.pie.label.radius>1?l.series.pie.label.radius:n*l.series.pie.label.radius,r=0;r<v.length;++r){if(v[r].percent>=100*l.series.pie.label.threshold&&!h(v[r],s,r))return!1;s+=v[r].angle}return!0;function h(i,s,r){if(0==i.data[0][1])return!0;var n,h=l.legend.labelFormatter,g=l.series.pie.label.formatter;n=h?h(i.label,i):i.label,g&&(n=g(n,i));var d=(s+i.angle+s)/2,f=o+Math.round(Math.cos(d)*t),v=p+Math.round(Math.sin(d)*t)*l.series.pie.tilt,b="<span class='pieLabel' id='pieLabel"+r+"' style='position:absolute;top:"+v+"px;left:"+f+"px;'>"+n+"</span>";a.append(b);var w=a.children("#pieLabel"+r),k=v-w.height()/2,M=f-w.width()/2;if(w.css("top",k),w.css("left",M),0-k>0||0-M>0||u-(k+w.height())<0||c-(M+w.width())<0)return!1;if(0!=l.series.pie.label.background.opacity){var P=l.series.pie.label.background.color;null==P&&(P=i.color);var A="top:"+k+"px;left:"+M+"px;";e("<div class='pieLabelBackground' style='position:absolute;width:"+w.width()+"px;height:"+w.height()+"px;"+A+"background-color:"+P+";'></div>").css("opacity",l.series.pie.label.background.opacity).insertBefore(w)}return!0}}();function h(e,i,r){e<=0||isNaN(e)||(r?g.fillStyle=i:(g.strokeStyle=i,g.lineJoin="round"),g.beginPath(),Math.abs(e-2*Math.PI)>1e-9&&g.moveTo(0,0),g.arc(0,0,s,t,t+e/2,!1),g.arc(0,0,s,t+e/2,t+e,!1),g.closePath(),t+=e,r?g.fill():g.stroke())}}}function f(e){if(l.series.pie.innerRadius>0){e.save();var i=l.series.pie.innerRadius>1?l.series.pie.innerRadius:n*l.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=l.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=l.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.stroke(),e.closePath(),e.restore()}}function v(e,i){for(var s=!1,t=-1,r=e.length,a=r-1;++t<r;a=t)(e[t][1]<=i[1]&&i[1]<e[a][1]||e[a][1]<=i[1]&&i[1]<e[t][1])&&i[0]<(e[a][0]-e[t][0])*(i[1]-e[t][1])/(e[a][1]-e[t][1])+e[t][0]&&(s=!s);return s}function b(e){k("plothover",e)}function w(e){k("plotclick",e)}function k(e,i){var s=t.offset(),r=function(e,i){for(var s,r,a=t.getData(),l=t.getOptions(),h=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius,c=0;c<a.length;++c){var u=a[c];if(u.pie.show){if(g.save(),g.beginPath(),g.moveTo(0,0),g.arc(0,0,h,u.startAngle,u.startAngle+u.angle/2,!1),g.arc(0,0,h,u.startAngle+u.angle/2,u.startAngle+u.angle,!1),g.closePath(),s=e-o,r=i-p,g.isPointInPath){if(g.isPointInPath(e-o,i-p))return g.restore(),{datapoint:[u.percent,u.data],dataIndex:0,series:u,seriesIndex:c}}else if(v([[0,0],[h*Math.cos(u.startAngle),h*Math.sin(u.startAngle)],[h*Math.cos(u.startAngle+u.angle/4),h*Math.sin(u.startAngle+u.angle/4)],[h*Math.cos(u.startAngle+u.angle/2),h*Math.sin(u.startAngle+u.angle/2)],[h*Math.cos(u.startAngle+u.angle/1.5),h*Math.sin(u.startAngle+u.angle/1.5)],[h*Math.cos(u.startAngle+u.angle),h*Math.sin(u.startAngle+u.angle)]],[s,r]))return g.restore(),{datapoint:[u.percent,u.data],dataIndex:0,series:u,seriesIndex:c};g.restore()}}return null}(parseInt(i.pageX-s.left),parseInt(i.pageY-s.top));if(l.grid.autoHighlight)for(var h=0;h<c.length;++h){var u=c[h];u.auto!=e||r&&u.series==r.series||M(u.series)}r&&function(e,i){var s=P(e);-1==s?(c.push({series:e,auto:i}),t.triggerRedrawOverlay()):i||(c[s].auto=!1)}(r.series,e);var d={pageX:i.pageX,pageY:i.pageY};a.trigger(e,[d,r])}function M(e){null==e&&(c=[],t.triggerRedrawOverlay());var i=P(e);-1!=i&&(c.splice(i,1),t.triggerRedrawOverlay())}function P(e){for(var i=0;i<c.length;++i)if(c[i].series==e)return i;return-1}t.hooks.processOptions.push(function(e,i){i.series.pie.show&&(i.grid.show=!1,"auto"==i.series.pie.label.show&&(i.legend.show?i.series.pie.label.show=!1:i.series.pie.label.show=!0),"auto"==i.series.pie.radius&&(i.series.pie.label.show?i.series.pie.radius=.75:i.series.pie.radius=1),i.series.pie.tilt>1?i.series.pie.tilt=1:i.series.pie.tilt<0&&(i.series.pie.tilt=0))}),t.hooks.bindEvents.push(function(e,i){var s=e.getOptions();s.series.pie.show&&(s.grid.hoverable&&i.unbind("mousemove").mousemove(b),s.grid.clickable&&i.unbind("click").click(w))}),t.hooks.processDatapoints.push(function(e,i,s,t){e.getOptions().series.pie.show&&u(e)}),t.hooks.drawOverlay.push(function(e,i){e.getOptions().series.pie.show&&function(e,i){var s=e.getOptions(),t=s.series.pie.radius>1?s.series.pie.radius:n*s.series.pie.radius;i.save(),i.translate(o,p),i.scale(1,s.series.pie.tilt);for(var r=0;r<c.length;++r)a(c[r].series);function a(e){e.angle<=0||isNaN(e.angle)||(i.fillStyle="rgba(255, 255, 255, "+s.series.pie.highlight.opacity+")",i.beginPath(),Math.abs(e.angle-2*Math.PI)>1e-9&&i.moveTo(0,0),i.arc(0,0,t,e.startAngle,e.startAngle+e.angle/2,!1),i.arc(0,0,t,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),i.closePath(),i.fill())}f(i),i.restore()}(e,i)}),t.hooks.draw.push(function(e,i){e.getOptions().series.pie.show&&d(e,i)})},options:t,name:"pie",version:"1.1"})}(jQuery);