define(["modules/graphs/module","jquery-jvectormap","jquery-jvectormap-world-mill-en"],function(a){"use strict";a.registerDirective("vectorMap",function(){return{restrict:"EA",scope:{mapData:"="},link:function(a,b){var c=a.mapData;b.vectorMap({map:"world_mill_en",backgroundColor:"#fff",regionStyle:{initial:{fill:"#c4c4c4"},hover:{"fill-opacity":1}},series:{regions:[{values:c,scale:["#85a8b6","#4d7686"],normalizeFunction:"polynomial"}]},onRegionLabelShow:function(a,b,d){if("undefined"==typeof c[d])a.preventDefault();else{var e=c[d];b.html(b.html()+": "+e+" visits")}}}),b.on("$destroy",function(){b.children(".jvectormap-container").data("mapObject").remove()})}}})});