define(["modules/graphs/module","morris"],function(a){"use strict";return a.registerDirective("morrisBarGraph",function(){return{restrict:"E",replace:!0,template:'<div class="chart no-padding"></div>',link:function(a,b){Morris.Bar({element:b,data:[{x:"2011 Q1",y:0},{x:"2011 Q2",y:1},{x:"2011 Q3",y:2},{x:"2011 Q4",y:3},{x:"2012 Q1",y:4},{x:"2012 Q2",y:5},{x:"2012 Q3",y:6},{x:"2012 Q4",y:7},{x:"2013 Q1",y:8}],xkey:"x",ykeys:["y"],labels:["Y"],barColors:function(a,b,c){if("bar"===c){var d=Math.ceil(150*a.y/this.ymax);return"rgb("+d+",0,0)"}return"#000"}})}}})});