define(["modules/graphs/module","modules/graphs/directives/flot/FlotConfig","flot","flot-resize","flot-fillbetween","flot-orderBar","flot-pie","flot-time","flot-tooltip"],function(a){"use strict";return a.registerDirective("flotPieChart",function(){return{restrict:"E",replace:!0,template:'<div class="chart"></div>',scope:{data:"="},link:function(a,b){$.plot(b,a.data,{series:{pie:{show:!0,innerRadius:.5,radius:1,label:{show:!1,radius:2/3,formatter:function(a,b){return'<div style="font-size:11px;text-align:center;padding:4px;color:white;">'+a+"<br/>"+Math.round(b.percent)+"%</div>"},threshold:.1}}},legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#000",container:null,position:"ne",margin:[5,10],backgroundColor:"#efefef",backgroundOpacity:1},grid:{hoverable:!0,clickable:!0}})}}})});