!function(){"use strict";function t(t){return{restrict:"CA",scope:{id:"@",data:"=",labels:"=",options:"=",series:"=",legend:"@",click:"="},link:function(i,l){var e;i.$watch("data",function(n){(!r(t)||n[0].length)&&(e?(r(t)?e.datasets.forEach(function(t,o){t.points=t.points.map(function(t,r){return t.value=n[o][r],t})}):e.segments.forEach(function(t,o){t.value=n[o]}),e.update()):(e=o(t,i),i.legend&&l.parent().append(e.generateLegend())))},!0)}}}function o(t,o){var l=document.getElementById(o.id),n=l.getContext("2d"),a=r(t)?i(o.labels,o.data,o.series||[]):e(o.labels,o.data),g=new Chart(n)[t](a,o.options||{});return o.click&&(l.onclick=function(i){if(g.getPointsAtEvent||g.getSegmentsAtEvent){var l=r(t)?g.getPointsAtEvent(i):g.getSegmentsAtEvent(i);o.click(l,i)}}),g}function r(t){return["Line","Bar","Radar"].indexOf(t)>-1}function i(t,o,r){return{labels:t,datasets:o.map(function(t,o){var i=l(Chart.defaults.global.colours[o]);return i.label=r[o],i.data=t,i})}}function l(t){var o={};for(var r in t)t.hasOwnProperty(r)&&(o[r]=t[r]);return o}function e(t,o){return t.map(function(t,r){return{label:t,value:o[r],color:Chart.defaults.global.colours[r].strokeColor,highlight:Chart.defaults.global.colours[r].pointHighlightStroke}})}Chart.defaults.global.responsive=!0,Chart.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",Chart.defaults.global.colours=[{fillColor:"rgba(151,187,205,0.2)",strokeColor:"rgba(151,187,205,1)",pointColor:"rgba(151,187,205,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(151,187,205,0.8)"},{fillColor:"rgba(220,220,220,0.2)",strokeColor:"rgba(220,220,220,1)",pointColor:"rgba(220,220,220,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(220,220,220,0.8)"},{fillColor:"rgba(247,70,74,0.2)",strokeColor:"rgba(247,70,74,1)",pointColor:"rgba(247,70,74,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(247,70,74,0.8)"},{fillColor:"rgba(70,191,189,0.2)",strokeColor:"rgba(70,191,189,1)",pointColor:"rgba(70,191,189,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(70,191,189,0.8)"},{fillColor:"rgba(253,180,92,0.2)",strokeColor:"rgba(253,180,92,1)",pointColor:"rgba(253,180,92,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(253,180,92,0.8)"},{fillColor:"rgba(148,159,177,0.2)",strokeColor:"rgba(148,159,177,1)",pointColor:"rgba(148,159,177,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(148,159,177,0.8)"},{fillColor:"rgba(77,83,96,0.2)",strokeColor:"rgba(77,83,96,1)",pointColor:"rgba(77,83,96,1)",pointStrokeColor:"#fff",pointHighlightFill:"#fff",pointHighlightStroke:"rgba(77,83,96,1)"}],angular.module("chart.js",[]).directive("chartLine",function(){return t("Line")}).directive("chartBar",function(){return t("Bar")}).directive("chartRadar",function(){return t("Radar")}).directive("chartDoughnut",function(){return t("Doughnut")}).directive("chartPie",function(){return t("Pie")}).directive("chartPolarArea",function(){return t("PolarArea")})}();
//# sourceMappingURL=angular-chart.js.map