diff --git a/bower.json b/bower.json index cfb4f46d..fda27f47 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-chart.js", - "version": "1.0.0-alpha4", + "version": "1.0.0-alpha5", "main": [ "./dist/angular-chart.js" ], diff --git a/dist/angular-chart.js b/dist/angular-chart.js index 00dd7c78..a5de2685 100644 --- a/dist/angular-chart.js +++ b/dist/angular-chart.js @@ -281,7 +281,7 @@ data: item }); if (yaxis) { - dataset.yAxisID = 'y-axis-' + (i + 1); + dataset.yAxisID = yaxis[i]; } return dataset; }) diff --git a/dist/angular-chart.js.tar.gz b/dist/angular-chart.js.tar.gz index a83a22e7..5dd4c8ba 100644 Binary files a/dist/angular-chart.js.tar.gz and b/dist/angular-chart.js.tar.gz differ diff --git a/dist/angular-chart.min.js b/dist/angular-chart.min.js index 81347d59..abd5bf7b 100644 --- a/dist/angular-chart.min.js +++ b/dist/angular-chart.min.js @@ -1,2 +1,2 @@ -!function(t){"use strict";if("object"==typeof exports)module.exports=t("undefined"!=typeof angular?angular:require("angular"),"undefined"!=typeof Chart?Chart:require("chart.js"));else if("function"==typeof define&&define.amd)define(["angular","chart"],t);else{if("undefined"==typeof angular||"undefined"==typeof Chart)throw new Error("Chart.js library needs to included, see http://jtblin.github.io/angular-chart.js/");t(angular,Chart)}}(function(t,r){"use strict";function a(){var a={},e={Chart:r,getOptions:function(r){var e=r&&a[r]||{};return t.extend({},a,e)}};this.setOptions=function(r,e){return e?void(a[r]=t.extend(a[r]||{},e)):(e=r,void(a=t.extend(a,e)))},this.$get=function(){return e}}function e(a,e){function o(t,r){return t&&r&&t.length&&r.length?Array.isArray(t[0])?t.length===r.length&&t.every(function(t,a){return t.length===r[a].length}):r.reduce(c,0)>0?t.length===r.length:!1:!1}function c(t,r){return t+r}function i(r,a,e,n){var o=null;return function(c){var i=a.getElementsAtEvent||a.getPointsAtEvent;if(i){var u=i.call(a,c);n!==!1&&t.equals(o,u)!==!1||(o=u,r[e](u,c))}}}function u(e,n){for(var o=t.copy(n.chartColors||a.getOptions(e).chartColors||r.defaults.global.colors),c=o.length>16&255,e=r>>8&255,n=255&r;return[a,e,n]}function p(r,a,e,n,o){return{labels:r,datasets:a.map(function(r,a){var c=t.extend({},n[a],{label:e[a],data:r});return o&&(c.yAxisID="y-axis-"+(a+1)),c})}}function C(t,r,a){return{labels:t,datasets:[{data:r,backgroundColor:a.map(function(t){return t.pointBackgroundColor}),hoverBackgroundColor:a.map(function(t){return t.backgroundColor})}]}}function v(t,r,a){Array.isArray(a.chartData[0])?t.data.datasets.forEach(function(t,a){t.data=r[a]}):t.data.datasets[0].data=r,t.update(),a.$emit("chart-update",t)}function y(t){return!t||Array.isArray(t)&&!t.length||"object"==typeof t&&!Object.keys(t).length}function b(e,n){var o=t.extend({},r.defaults.global,a.getOptions(e),n.chartOptions);return o.responsive}function m(t,r){t&&(t.destroy(),r.$emit("chart-destroy",t))}return function(r){return{restrict:"CA",scope:{chartGetColor:"=?",chartType:"=",chartData:"=?",chartLabels:"=?",chartOptions:"=?",chartSeries:"=?",chartColors:"=?",chartClick:"=?",chartHover:"=?",chartYAxes:"=?"},link:function(c,l){function s(a,e){if(!y(a)&&!t.equals(a,e)){var n=r||c.chartType;n&&f(n)}}function f(r){if(b(r,c)&&0===l[0].clientHeight)return e(function(){f(r)},50,!1);if(c.chartData&&c.chartData.length){c.chartGetColor="function"==typeof c.chartGetColor?c.chartGetColor:h;var n=u(r,c),o=l[0],s=o.getContext("2d"),g=Array.isArray(c.chartData[0])?p(c.chartLabels,c.chartData,c.chartSeries||[],n,c.chartYAxes):C(c.chartLabels,c.chartData,n),v=t.extend({},a.getOptions(r),c.chartOptions);m(d,c),d=new a.Chart(s,{type:r,data:g,options:v}),c.$emit("chart-create",d),o.onclick=c.chartClick?i(c,d,"chartClick",!1):t.noop,o.onmousemove=c.chartHover?i(c,d,"chartHover",!0):t.noop}}var d;n&&window.G_vmlCanvasManager.initElement(l[0]),c.$watch("chartData",function(t,a){if(!t||!t.length||Array.isArray(t[0])&&!t[0].length)return void m(d,c);var e=r||c.chartType;if(e)return d&&o(t,a)?v(d,t,c):void f(e)},!0),c.$watch("chartSeries",s,!0),c.$watch("chartLabels",s,!0),c.$watch("chartOptions",s,!0),c.$watch("chartColors",s,!0),c.$watch("chartType",function(r,a){y(r)||t.equals(r,a)||f(r)}),c.$on("$destroy",function(){m(d,c)})}}}}r.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",r.defaults.global.elements.line.borderWidth=2,r.defaults.global.elements.rectangle.borderWidth=2,r.defaults.global.legend.display=!1,r.defaults.global.colors=["#97BBCD","#DCDCDC","#F7464A","#46BFBD","#FDB45C","#949FB1","#4D5360"];var n="object"==typeof window.G_vmlCanvasManager&&null!==window.G_vmlCanvasManager&&"function"==typeof window.G_vmlCanvasManager.initElement;return n&&(r.defaults.global.animation=!1),t.module("chart.js",[]).provider("ChartJs",a).factory("ChartJsFactory",["ChartJs","$timeout",e]).directive("chartBase",["ChartJsFactory",function(t){return new t}]).directive("chartLine",["ChartJsFactory",function(t){return new t("line")}]).directive("chartBar",["ChartJsFactory",function(t){return new t("bar")}]).directive("chartRadar",["ChartJsFactory",function(t){return new t("radar")}]).directive("chartDoughnut",["ChartJsFactory",function(t){return new t("doughnut")}]).directive("chartPie",["ChartJsFactory",function(t){return new t("pie")}]).directive("chartPolarArea",["ChartJsFactory",function(t){return new t("polarArea")}])}); +!function(t){"use strict";if("object"==typeof exports)module.exports=t("undefined"!=typeof angular?angular:require("angular"),"undefined"!=typeof Chart?Chart:require("chart.js"));else if("function"==typeof define&&define.amd)define(["angular","chart"],t);else{if("undefined"==typeof angular||"undefined"==typeof Chart)throw new Error("Chart.js library needs to included, see http://jtblin.github.io/angular-chart.js/");t(angular,Chart)}}(function(t,r){"use strict";function e(){var e={},a={Chart:r,getOptions:function(r){var a=r&&e[r]||{};return t.extend({},e,a)}};this.setOptions=function(r,a){return a?void(e[r]=t.extend(e[r]||{},a)):(a=r,void(e=t.extend(e,a)))},this.$get=function(){return a}}function a(e,a){function o(t,r){return t&&r&&t.length&&r.length?Array.isArray(t[0])?t.length===r.length&&t.every(function(t,e){return t.length===r[e].length}):r.reduce(c,0)>0?t.length===r.length:!1:!1}function c(t,r){return t+r}function i(r,e,a,n){var o=null;return function(c){var i=e.getElementsAtEvent||e.getPointsAtEvent;if(i){var u=i.call(e,c);n!==!1&&t.equals(o,u)!==!1||(o=u,r[a](u,c))}}}function u(a,n){for(var o=t.copy(n.chartColors||e.getOptions(a).chartColors||r.defaults.global.colors),c=o.length>16&255,a=r>>8&255,n=255&r;return[e,a,n]}function p(r,e,a,n,o){return{labels:r,datasets:e.map(function(r,e){var c=t.extend({},n[e],{label:a[e],data:r});return o&&(c.yAxisID=o[e]),c})}}function C(t,r,e){return{labels:t,datasets:[{data:r,backgroundColor:e.map(function(t){return t.pointBackgroundColor}),hoverBackgroundColor:e.map(function(t){return t.backgroundColor})}]}}function v(t,r,e){Array.isArray(e.chartData[0])?t.data.datasets.forEach(function(t,e){t.data=r[e]}):t.data.datasets[0].data=r,t.update(),e.$emit("chart-update",t)}function y(t){return!t||Array.isArray(t)&&!t.length||"object"==typeof t&&!Object.keys(t).length}function b(a,n){var o=t.extend({},r.defaults.global,e.getOptions(a),n.chartOptions);return o.responsive}function m(t,r){t&&(t.destroy(),r.$emit("chart-destroy",t))}return function(r){return{restrict:"CA",scope:{chartGetColor:"=?",chartType:"=",chartData:"=?",chartLabels:"=?",chartOptions:"=?",chartSeries:"=?",chartColors:"=?",chartClick:"=?",chartHover:"=?",chartYAxes:"=?"},link:function(c,l){function s(e,a){if(!y(e)&&!t.equals(e,a)){var n=r||c.chartType;n&&f(n)}}function f(r){if(b(r,c)&&0===l[0].clientHeight)return a(function(){f(r)},50,!1);if(c.chartData&&c.chartData.length){c.chartGetColor="function"==typeof c.chartGetColor?c.chartGetColor:h;var n=u(r,c),o=l[0],s=o.getContext("2d"),g=Array.isArray(c.chartData[0])?p(c.chartLabels,c.chartData,c.chartSeries||[],n,c.chartYAxes):C(c.chartLabels,c.chartData,n),v=t.extend({},e.getOptions(r),c.chartOptions);m(d,c),d=new e.Chart(s,{type:r,data:g,options:v}),c.$emit("chart-create",d),o.onclick=c.chartClick?i(c,d,"chartClick",!1):t.noop,o.onmousemove=c.chartHover?i(c,d,"chartHover",!0):t.noop}}var d;n&&window.G_vmlCanvasManager.initElement(l[0]),c.$watch("chartData",function(t,e){if(!t||!t.length||Array.isArray(t[0])&&!t[0].length)return void m(d,c);var a=r||c.chartType;if(a)return d&&o(t,e)?v(d,t,c):void f(a)},!0),c.$watch("chartSeries",s,!0),c.$watch("chartLabels",s,!0),c.$watch("chartOptions",s,!0),c.$watch("chartColors",s,!0),c.$watch("chartType",function(r,e){y(r)||t.equals(r,e)||f(r)}),c.$on("$destroy",function(){m(d,c)})}}}}r.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",r.defaults.global.elements.line.borderWidth=2,r.defaults.global.elements.rectangle.borderWidth=2,r.defaults.global.legend.display=!1,r.defaults.global.colors=["#97BBCD","#DCDCDC","#F7464A","#46BFBD","#FDB45C","#949FB1","#4D5360"];var n="object"==typeof window.G_vmlCanvasManager&&null!==window.G_vmlCanvasManager&&"function"==typeof window.G_vmlCanvasManager.initElement;return n&&(r.defaults.global.animation=!1),t.module("chart.js",[]).provider("ChartJs",e).factory("ChartJsFactory",["ChartJs","$timeout",a]).directive("chartBase",["ChartJsFactory",function(t){return new t}]).directive("chartLine",["ChartJsFactory",function(t){return new t("line")}]).directive("chartBar",["ChartJsFactory",function(t){return new t("bar")}]).directive("chartRadar",["ChartJsFactory",function(t){return new t("radar")}]).directive("chartDoughnut",["ChartJsFactory",function(t){return new t("doughnut")}]).directive("chartPie",["ChartJsFactory",function(t){return new t("pie")}]).directive("chartPolarArea",["ChartJsFactory",function(t){return new t("polarArea")}])}); //# sourceMappingURL=angular-chart.min.js.map diff --git a/dist/angular-chart.min.js.map b/dist/angular-chart.min.js.map index c1e86e16..b9fbf10f 100644 --- a/dist/angular-chart.min.js.map +++ b/dist/angular-chart.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["angular-chart.min.js"],"names":["factory","exports","module","angular","require","Chart","define","amd","Error","ChartJsProvider","options","ChartJs","getOptions","type","typeOptions","extend","this","setOptions","customOptions","$get","ChartJsFactory","$timeout","canUpdateChart","newVal","oldVal","length","Array","isArray","every","element","index","reduce","sum","carry","val","getEventHandler","scope","chart","action","triggerOnlyOnChange","lastState","evt","atEvent","getElementsAtEvent","getPointsAtEvent","activePoints","call","equals","getColors","colors","copy","chartColors","defaults","global","notEnoughColors","chartData","push","chartGetColor","map","convertColor","color","getColor","hexToRgb","substr","getRandomColor","getRandomInt","backgroundColor","rgba","borderColor","pointBackgroundColor","pointBorderColor","pointHoverBackgroundColor","pointHoverBorderColor","min","max","Math","floor","random","alpha","usingExcanvas","join","concat","hex","bigint","parseInt","r","g","b","getDataSets","labels","data","series","yaxis","datasets","item","i","dataset","label","yAxisID","getData","hoverBackgroundColor","updateChart","values","forEach","update","$emit","isEmpty","value","Object","keys","isResponsive","chartOptions","responsive","destroyChart","destroy","restrict","chartType","chartLabels","chartSeries","chartClick","chartHover","chartYAxes","link","elem","resetChart","createChart","clientHeight","cvs","ctx","getContext","onclick","noop","onmousemove","window","G_vmlCanvasManager","initElement","$watch","$on","multiTooltipTemplate","elements","line","borderWidth","rectangle","legend","display","animation","provider","directive"],"mappings":"CAAC,SAAUA,GACT,YACA,IAAuB,gBAAZC,SAETC,OAAOD,QAAUD,EACI,mBAAZG,SAA0BA,QAAUC,QAAQ,WAClC,mBAAVC,OAAwBA,MAAQD,QAAQ,iBAC3C,IAAsB,kBAAXE,SAAyBA,OAAOC,IAEjDD,QAAQ,UAAW,SAAUN,OACxB,CAEL,GAAuB,mBAAZG,UAA4C,mBAAVE,OAAuB,KAAM,IAAIG,OAAM,oFAEpFR,GAAQG,QAASE,SAEnB,SAAUF,EAASE,GACn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H,EAAQC,GACtCkF,EAAQnF,IACRpB,EAAQ4C,OAAOxB,EAAQC,IAC3BqG,EAAYtG,KAGda,EAAMqG,IAAI,WAAY,WACpBxB,EAAa5E,EAAOD,QAtH9B/B,EAAM+C,SAASC,OAAOqF,qBAAuB,6DAC7CrI,EAAM+C,SAASC,OAAOsF,SAASC,KAAKC,YAAc,EAClDxI,EAAM+C,SAASC,OAAOsF,SAASG,UAAUD,YAAc,EACvDxI,EAAM+C,SAASC,OAAO0F,OAAOC,SAAU,EACvC3I,EAAM+C,SAASC,OAAOJ,QACpB,UACA,UACA,UACA,UACA,UACA,UACA,UAGF,IAAI8B,GAAqD,gBAA9BsD,QAAOC,oBACF,OAA9BD,OAAOC,oBAC0C,kBAA1CD,QAAOC,mBAAmBC,WAInC,OAFIxD,KAAe1E,EAAM+C,SAASC,OAAO4F,WAAY,GAE9C9I,EAAQD,OAAO,eACnBgJ,SAAS,UAAWzI,GACpBT,QAAQ,kBAAmB,UAAW,WAAYoB,IAClD+H,UAAU,aAAc,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,MACjF+H,UAAU,aAAc,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,GAAe,WAChG+H,UAAU,YAAa,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,GAAe,UAC/F+H,UAAU,cAAe,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,GAAe,YACjG+H,UAAU,iBAAkB,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,GAAe,eACpG+H,UAAU,YAAa,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,GAAe,UAC/F+H,UAAU,kBAAmB,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,GAAe","file":"angular-chart.min.js","sourcesContent":["(function (factory) {\n 'use strict';\n if (typeof exports === 'object') {\n // Node/CommonJS\n module.exports = factory(\n typeof angular !== 'undefined' ? angular : require('angular'),\n typeof Chart !== 'undefined' ? Chart : require('chart.js'));\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['angular', 'chart'], factory);\n } else {\n // Browser globals\n if (typeof angular === 'undefined' || typeof Chart === 'undefined') throw new Error('Chart.js library needs to included, ' +\n 'see http://jtblin.github.io/angular-chart.js/');\n factory(angular, Chart);\n }\n}(function (angular, Chart) {\n 'use strict';\n\n Chart.defaults.global.multiTooltipTemplate = '<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>';\n Chart.defaults.global.elements.line.borderWidth = 2;\n Chart.defaults.global.elements.rectangle.borderWidth = 2;\n Chart.defaults.global.legend.display = false;\n Chart.defaults.global.colors = [\n '#97BBCD', // blue\n '#DCDCDC', // light grey\n '#F7464A', // red\n '#46BFBD', // green\n '#FDB45C', // yellow\n '#949FB1', // grey\n '#4D5360' // dark grey\n ];\n\n var usingExcanvas = typeof window.G_vmlCanvasManager === 'object' &&\n window.G_vmlCanvasManager !== null &&\n typeof window.G_vmlCanvasManager.initElement === 'function';\n\n if (usingExcanvas) Chart.defaults.global.animation = false;\n\n return angular.module('chart.js', [])\n .provider('ChartJs', ChartJsProvider)\n .factory('ChartJsFactory', ['ChartJs', '$timeout', ChartJsFactory])\n .directive('chartBase', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory(); }])\n .directive('chartLine', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('line'); }])\n .directive('chartBar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('bar'); }])\n .directive('chartRadar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('radar'); }])\n .directive('chartDoughnut', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('doughnut'); }])\n .directive('chartPie', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('pie'); }])\n .directive('chartPolarArea', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('polarArea'); }]);\n\n /**\n * Wrapper for chart.js\n * Allows configuring chart js using the provider\n *\n * angular.module('myModule', ['chart.js']).config(function(ChartJsProvider) {\n * ChartJsProvider.setOptions({ responsive: true });\n * ChartJsProvider.setOptions('Line', { responsive: false });\n * })))\n */\n function ChartJsProvider () {\n var options = {};\n var ChartJs = {\n Chart: Chart,\n getOptions: function (type) {\n var typeOptions = type && options[type] || {};\n return angular.extend({}, options, typeOptions);\n }\n };\n\n /**\n * Allow to set global options during configuration\n */\n this.setOptions = function (type, customOptions) {\n // If no type was specified set option for the global object\n if (! customOptions) {\n customOptions = type;\n options = angular.extend(options, customOptions);\n return;\n }\n // Set options for the specific chart\n options[type] = angular.extend(options[type] || {}, customOptions);\n };\n\n this.$get = function () {\n return ChartJs;\n };\n }\n\n function ChartJsFactory (ChartJs, $timeout) {\n return function chart (type) {\n return {\n restrict: 'CA',\n scope: {\n chartGetColor: '=?',\n chartType: '=',\n chartData: '=?',\n chartLabels: '=?',\n chartOptions: '=?',\n chartSeries: '=?',\n chartColors: '=?',\n chartClick: '=?',\n chartHover: '=?',\n chartYAxes: '=?'\n },\n link: function (scope, elem/*, attrs */) {\n var chart;\n\n if (usingExcanvas) window.G_vmlCanvasManager.initElement(elem[0]);\n\n // Order of setting \"watch\" matter\n\n scope.$watch('chartData', function (newVal, oldVal) {\n if (! newVal || ! newVal.length || (Array.isArray(newVal[0]) && ! newVal[0].length)) {\n destroyChart(chart, scope);\n return;\n }\n var chartType = type || scope.chartType;\n if (! chartType) return;\n\n if (chart && canUpdateChart(newVal, oldVal))\n return updateChart(chart, newVal, scope);\n\n createChart(chartType);\n }, true);\n\n scope.$watch('chartSeries', resetChart, true);\n scope.$watch('chartLabels', resetChart, true);\n scope.$watch('chartOptions', resetChart, true);\n scope.$watch('chartColors', resetChart, true);\n\n scope.$watch('chartType', function (newVal, oldVal) {\n if (isEmpty(newVal)) return;\n if (angular.equals(newVal, oldVal)) return;\n createChart(newVal);\n });\n\n scope.$on('$destroy', function () {\n destroyChart(chart, scope);\n });\n\n function resetChart (newVal, oldVal) {\n if (isEmpty(newVal)) return;\n if (angular.equals(newVal, oldVal)) return;\n var chartType = type || scope.chartType;\n if (! chartType) return;\n\n // chart.update() doesn't work for series and labels\n // so we have to re-create the chart entirely\n createChart(chartType);\n }\n\n function createChart (type) {\n // TODO: check parent?\n if (isResponsive(type, scope) && elem[0].clientHeight === 0) {\n return $timeout(function () {\n createChart(type);\n }, 50, false);\n }\n if (! scope.chartData || ! scope.chartData.length) return;\n scope.chartGetColor = typeof scope.chartGetColor === 'function' ? scope.chartGetColor : getRandomColor;\n var colors = getColors(type, scope);\n var cvs = elem[0], ctx = cvs.getContext('2d');\n var data = Array.isArray(scope.chartData[0]) ?\n getDataSets(scope.chartLabels, scope.chartData, scope.chartSeries || [], colors, scope.chartYAxes) :\n getData(scope.chartLabels, scope.chartData, colors);\n\n var options = angular.extend({}, ChartJs.getOptions(type), scope.chartOptions);\n // Destroy old chart if it exists to avoid ghost charts issue\n // https://github.com/jtblin/angular-chart.js/issues/187\n destroyChart(chart, scope);\n\n chart = new ChartJs.Chart(ctx, {\n type: type,\n data: data,\n options: options\n });\n scope.$emit('chart-create', chart);\n\n // Bind events\n cvs.onclick = scope.chartClick ? getEventHandler(scope, chart, 'chartClick', false) : angular.noop;\n cvs.onmousemove = scope.chartHover ? getEventHandler(scope, chart, 'chartHover', true) : angular.noop;\n }\n }\n };\n };\n\n function canUpdateChart (newVal, oldVal) {\n if (newVal && oldVal && newVal.length && oldVal.length) {\n return Array.isArray(newVal[0]) ?\n newVal.length === oldVal.length && newVal.every(function (element, index) {\n return element.length === oldVal[index].length; }) :\n oldVal.reduce(sum, 0) > 0 ? newVal.length === oldVal.length : false;\n }\n return false;\n }\n\n function sum (carry, val) {\n return carry + val;\n }\n\n function getEventHandler (scope, chart, action, triggerOnlyOnChange) {\n var lastState = null;\n return function (evt) {\n var atEvent = chart.getElementsAtEvent || chart.getPointsAtEvent;\n if (atEvent) {\n var activePoints = atEvent.call(chart, evt);\n if (triggerOnlyOnChange === false || angular.equals(lastState, activePoints) === false) {\n lastState = activePoints;\n scope[action](activePoints, evt);\n }\n }\n };\n }\n\n function getColors (type, scope) {\n var colors = angular.copy(scope.chartColors ||\n ChartJs.getOptions(type).chartColors ||\n Chart.defaults.global.colors\n );\n var notEnoughColors = colors.length < scope.chartData.length;\n while (colors.length < scope.chartData.length) {\n colors.push(scope.chartGetColor());\n }\n // mutate colors in this case as we don't want\n // the colors to change on each refresh\n if (notEnoughColors) scope.chartColors = colors;\n return colors.map(convertColor);\n }\n\n function convertColor (color) {\n if (typeof color === 'object' && color !== null) return color;\n if (typeof color === 'string' && color[0] === '#') return getColor(hexToRgb(color.substr(1)));\n return getRandomColor();\n }\n\n function getRandomColor () {\n var color = [getRandomInt(0, 255), getRandomInt(0, 255), getRandomInt(0, 255)];\n return getColor(color);\n }\n\n function getColor (color) {\n return {\n backgroundColor: rgba(color, 0.2),\n borderColor: rgba(color, 1),\n pointBackgroundColor: rgba(color, 1),\n pointBorderColor: '#fff',\n pointHoverBackgroundColor: '#fff',\n pointHoverBorderColor: rgba(color, 0.8)\n };\n }\n\n function getRandomInt (min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n\n function rgba (color, alpha) {\n if (usingExcanvas) {\n // rgba not supported by IE8\n return 'rgb(' + color.join(',') + ')';\n } else {\n return 'rgba(' + color.concat(alpha).join(',') + ')';\n }\n }\n\n // Credit: http://stackoverflow.com/a/11508164/1190235\n function hexToRgb (hex) {\n var bigint = parseInt(hex, 16),\n r = (bigint >> 16) & 255,\n g = (bigint >> 8) & 255,\n b = bigint & 255;\n\n return [r, g, b];\n }\n\n function getDataSets (labels, data, series, colors, yaxis) {\n return {\n labels: labels,\n datasets: data.map(function (item, i) {\n var dataset = angular.extend({}, colors[i], {\n label: series[i],\n data: item\n });\n if (yaxis) {\n dataset.yAxisID = 'y-axis-' + (i + 1);\n }\n return dataset;\n })\n };\n }\n\n function getData (labels, data, colors) {\n return {\n labels: labels,\n datasets: [{\n data: data,\n backgroundColor: colors.map(function (color) {\n return color.pointBackgroundColor;\n }),\n hoverBackgroundColor: colors.map(function (color) {\n return color.backgroundColor;\n })\n }]\n };\n }\n\n function updateChart (chart, values, scope) {\n if (Array.isArray(scope.chartData[0])) {\n chart.data.datasets.forEach(function (dataset, i) {\n dataset.data = values[i];\n });\n } else {\n chart.data.datasets[0].data = values;\n }\n\n chart.update();\n scope.$emit('chart-update', chart);\n }\n\n function isEmpty (value) {\n return ! value ||\n (Array.isArray(value) && ! value.length) ||\n (typeof value === 'object' && ! Object.keys(value).length);\n }\n\n function isResponsive (type, scope) {\n var options = angular.extend({}, Chart.defaults.global, ChartJs.getOptions(type), scope.chartOptions);\n return options.responsive;\n }\n\n function destroyChart(chart, scope) {\n if(! chart) return;\n chart.destroy();\n scope.$emit('chart-destroy', chart);\n }\n }\n}));\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["angular-chart.min.js"],"names":["factory","exports","module","angular","require","Chart","define","amd","Error","ChartJsProvider","options","ChartJs","getOptions","type","typeOptions","extend","this","setOptions","customOptions","$get","ChartJsFactory","$timeout","canUpdateChart","newVal","oldVal","length","Array","isArray","every","element","index","reduce","sum","carry","val","getEventHandler","scope","chart","action","triggerOnlyOnChange","lastState","evt","atEvent","getElementsAtEvent","getPointsAtEvent","activePoints","call","equals","getColors","colors","copy","chartColors","defaults","global","notEnoughColors","chartData","push","chartGetColor","map","convertColor","color","getColor","hexToRgb","substr","getRandomColor","getRandomInt","backgroundColor","rgba","borderColor","pointBackgroundColor","pointBorderColor","pointHoverBackgroundColor","pointHoverBorderColor","min","max","Math","floor","random","alpha","usingExcanvas","join","concat","hex","bigint","parseInt","r","g","b","getDataSets","labels","data","series","yaxis","datasets","item","i","dataset","label","yAxisID","getData","hoverBackgroundColor","updateChart","values","forEach","update","$emit","isEmpty","value","Object","keys","isResponsive","chartOptions","responsive","destroyChart","destroy","restrict","chartType","chartLabels","chartSeries","chartClick","chartHover","chartYAxes","link","elem","resetChart","createChart","clientHeight","cvs","ctx","getContext","onclick","noop","onmousemove","window","G_vmlCanvasManager","initElement","$watch","$on","multiTooltipTemplate","elements","line","borderWidth","rectangle","legend","display","animation","provider","directive"],"mappings":"CAAC,SAAUA,GACT,YACA,IAAuB,gBAAZC,SAETC,OAAOD,QAAUD,EACI,mBAAZG,SAA0BA,QAAUC,QAAQ,WAClC,mBAAVC,OAAwBA,MAAQD,QAAQ,iBAC3C,IAAsB,kBAAXE,SAAyBA,OAAOC,IAEjDD,QAAQ,UAAW,SAAUN,OACxB,CAEL,GAAuB,mBAAZG,UAA4C,mBAAVE,OAAuB,KAAM,IAAIG,OAAM,oFAEpFR,GAAQG,QAASE,SAEnB,SAAUF,EAASE,GACnB,YA0CA,SAASI,KACP,GAAIC,MACAC,GACFN,MAAOA,EACPO,WAAY,SAAUC,GACpB,GAAIC,GAAcD,GAAQH,EAAQG,MAClC,OAAOV,GAAQY,UAAWL,EAASI,IAOvCE,MAAKC,WAAa,SAAUJ,EAAMK,GAEhC,MAAMA,QAMNR,EAAQG,GAAQV,EAAQY,OAAOL,EAAQG,OAAaK,KALlDA,EAAgBL,OAChBH,EAAUP,EAAQY,OAAOL,EAASQ,MAOtCF,KAAKG,KAAO,WACV,MAAOR,IAIX,QAASS,GAAgBT,EAASU,GAkGhC,QAASC,GAAgBC,EAAQC,GAC/B,MAAID,IAAUC,GAAUD,EAAOE,QAAUD,EAAOC,OACvCC,MAAMC,QAAQJ,EAAO,IAC5BA,EAAOE,SAAWD,EAAOC,QAAUF,EAAOK,MAAM,SAAUC,EAASC,GACjE,MAAOD,GAAQJ,SAAWD,EAAOM,GAAOL,SACxCD,EAAOO,OAAOC,EAAK,GAAK,EAAIT,EAAOE,SAAWD,EAAOC,QAAS,GAE3D,EAGT,QAASO,GAAKC,EAAOC,GACnB,MAAOD,GAAQC,EAGjB,QAASC,GAAiBC,EAAOC,EAAOC,EAAQC,GAC9C,GAAIC,GAAY,IAChB,OAAO,UAAUC,GACf,GAAIC,GAAUL,EAAMM,oBAAsBN,EAAMO,gBAChD,IAA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B,SAAU/H,GAAkB,MAAO,IAAIA,GAAe,YACjG+H,UAAU,iBAAkB,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,GAAe,eACpG+H,UAAU,YAAa,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,GAAe,UAC/F+H,UAAU,kBAAmB,iBAAkB,SAAU/H,GAAkB,MAAO,IAAIA,GAAe","file":"angular-chart.min.js","sourcesContent":["(function (factory) {\n 'use strict';\n if (typeof exports === 'object') {\n // Node/CommonJS\n module.exports = factory(\n typeof angular !== 'undefined' ? angular : require('angular'),\n typeof Chart !== 'undefined' ? Chart : require('chart.js'));\n } else if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['angular', 'chart'], factory);\n } else {\n // Browser globals\n if (typeof angular === 'undefined' || typeof Chart === 'undefined') throw new Error('Chart.js library needs to included, ' +\n 'see http://jtblin.github.io/angular-chart.js/');\n factory(angular, Chart);\n }\n}(function (angular, Chart) {\n 'use strict';\n\n Chart.defaults.global.multiTooltipTemplate = '<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>';\n Chart.defaults.global.elements.line.borderWidth = 2;\n Chart.defaults.global.elements.rectangle.borderWidth = 2;\n Chart.defaults.global.legend.display = false;\n Chart.defaults.global.colors = [\n '#97BBCD', // blue\n '#DCDCDC', // light grey\n '#F7464A', // red\n '#46BFBD', // green\n '#FDB45C', // yellow\n '#949FB1', // grey\n '#4D5360' // dark grey\n ];\n\n var usingExcanvas = typeof window.G_vmlCanvasManager === 'object' &&\n window.G_vmlCanvasManager !== null &&\n typeof window.G_vmlCanvasManager.initElement === 'function';\n\n if (usingExcanvas) Chart.defaults.global.animation = false;\n\n return angular.module('chart.js', [])\n .provider('ChartJs', ChartJsProvider)\n .factory('ChartJsFactory', ['ChartJs', '$timeout', ChartJsFactory])\n .directive('chartBase', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory(); }])\n .directive('chartLine', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('line'); }])\n .directive('chartBar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('bar'); }])\n .directive('chartRadar', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('radar'); }])\n .directive('chartDoughnut', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('doughnut'); }])\n .directive('chartPie', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('pie'); }])\n .directive('chartPolarArea', ['ChartJsFactory', function (ChartJsFactory) { return new ChartJsFactory('polarArea'); }]);\n\n /**\n * Wrapper for chart.js\n * Allows configuring chart js using the provider\n *\n * angular.module('myModule', ['chart.js']).config(function(ChartJsProvider) {\n * ChartJsProvider.setOptions({ responsive: true });\n * ChartJsProvider.setOptions('Line', { responsive: false });\n * })))\n */\n function ChartJsProvider () {\n var options = {};\n var ChartJs = {\n Chart: Chart,\n getOptions: function (type) {\n var typeOptions = type && options[type] || {};\n return angular.extend({}, options, typeOptions);\n }\n };\n\n /**\n * Allow to set global options during configuration\n */\n this.setOptions = function (type, customOptions) {\n // If no type was specified set option for the global object\n if (! customOptions) {\n customOptions = type;\n options = angular.extend(options, customOptions);\n return;\n }\n // Set options for the specific chart\n options[type] = angular.extend(options[type] || {}, customOptions);\n };\n\n this.$get = function () {\n return ChartJs;\n };\n }\n\n function ChartJsFactory (ChartJs, $timeout) {\n return function chart (type) {\n return {\n restrict: 'CA',\n scope: {\n chartGetColor: '=?',\n chartType: '=',\n chartData: '=?',\n chartLabels: '=?',\n chartOptions: '=?',\n chartSeries: '=?',\n chartColors: '=?',\n chartClick: '=?',\n chartHover: '=?',\n chartYAxes: '=?'\n },\n link: function (scope, elem/*, attrs */) {\n var chart;\n\n if (usingExcanvas) window.G_vmlCanvasManager.initElement(elem[0]);\n\n // Order of setting \"watch\" matter\n\n scope.$watch('chartData', function (newVal, oldVal) {\n if (! newVal || ! newVal.length || (Array.isArray(newVal[0]) && ! newVal[0].length)) {\n destroyChart(chart, scope);\n return;\n }\n var chartType = type || scope.chartType;\n if (! chartType) return;\n\n if (chart && canUpdateChart(newVal, oldVal))\n return updateChart(chart, newVal, scope);\n\n createChart(chartType);\n }, true);\n\n scope.$watch('chartSeries', resetChart, true);\n scope.$watch('chartLabels', resetChart, true);\n scope.$watch('chartOptions', resetChart, true);\n scope.$watch('chartColors', resetChart, true);\n\n scope.$watch('chartType', function (newVal, oldVal) {\n if (isEmpty(newVal)) return;\n if (angular.equals(newVal, oldVal)) return;\n createChart(newVal);\n });\n\n scope.$on('$destroy', function () {\n destroyChart(chart, scope);\n });\n\n function resetChart (newVal, oldVal) {\n if (isEmpty(newVal)) return;\n if (angular.equals(newVal, oldVal)) return;\n var chartType = type || scope.chartType;\n if (! chartType) return;\n\n // chart.update() doesn't work for series and labels\n // so we have to re-create the chart entirely\n createChart(chartType);\n }\n\n function createChart (type) {\n // TODO: check parent?\n if (isResponsive(type, scope) && elem[0].clientHeight === 0) {\n return $timeout(function () {\n createChart(type);\n }, 50, false);\n }\n if (! scope.chartData || ! scope.chartData.length) return;\n scope.chartGetColor = typeof scope.chartGetColor === 'function' ? scope.chartGetColor : getRandomColor;\n var colors = getColors(type, scope);\n var cvs = elem[0], ctx = cvs.getContext('2d');\n var data = Array.isArray(scope.chartData[0]) ?\n getDataSets(scope.chartLabels, scope.chartData, scope.chartSeries || [], colors, scope.chartYAxes) :\n getData(scope.chartLabels, scope.chartData, colors);\n\n var options = angular.extend({}, ChartJs.getOptions(type), scope.chartOptions);\n // Destroy old chart if it exists to avoid ghost charts issue\n // https://github.com/jtblin/angular-chart.js/issues/187\n destroyChart(chart, scope);\n\n chart = new ChartJs.Chart(ctx, {\n type: type,\n data: data,\n options: options\n });\n scope.$emit('chart-create', chart);\n\n // Bind events\n cvs.onclick = scope.chartClick ? getEventHandler(scope, chart, 'chartClick', false) : angular.noop;\n cvs.onmousemove = scope.chartHover ? getEventHandler(scope, chart, 'chartHover', true) : angular.noop;\n }\n }\n };\n };\n\n function canUpdateChart (newVal, oldVal) {\n if (newVal && oldVal && newVal.length && oldVal.length) {\n return Array.isArray(newVal[0]) ?\n newVal.length === oldVal.length && newVal.every(function (element, index) {\n return element.length === oldVal[index].length; }) :\n oldVal.reduce(sum, 0) > 0 ? newVal.length === oldVal.length : false;\n }\n return false;\n }\n\n function sum (carry, val) {\n return carry + val;\n }\n\n function getEventHandler (scope, chart, action, triggerOnlyOnChange) {\n var lastState = null;\n return function (evt) {\n var atEvent = chart.getElementsAtEvent || chart.getPointsAtEvent;\n if (atEvent) {\n var activePoints = atEvent.call(chart, evt);\n if (triggerOnlyOnChange === false || angular.equals(lastState, activePoints) === false) {\n lastState = activePoints;\n scope[action](activePoints, evt);\n }\n }\n };\n }\n\n function getColors (type, scope) {\n var colors = angular.copy(scope.chartColors ||\n ChartJs.getOptions(type).chartColors ||\n Chart.defaults.global.colors\n );\n var notEnoughColors = colors.length < scope.chartData.length;\n while (colors.length < scope.chartData.length) {\n colors.push(scope.chartGetColor());\n }\n // mutate colors in this case as we don't want\n // the colors to change on each refresh\n if (notEnoughColors) scope.chartColors = colors;\n return colors.map(convertColor);\n }\n\n function convertColor (color) {\n if (typeof color === 'object' && color !== null) return color;\n if (typeof color === 'string' && color[0] === '#') return getColor(hexToRgb(color.substr(1)));\n return getRandomColor();\n }\n\n function getRandomColor () {\n var color = [getRandomInt(0, 255), getRandomInt(0, 255), getRandomInt(0, 255)];\n return getColor(color);\n }\n\n function getColor (color) {\n return {\n backgroundColor: rgba(color, 0.2),\n borderColor: rgba(color, 1),\n pointBackgroundColor: rgba(color, 1),\n pointBorderColor: '#fff',\n pointHoverBackgroundColor: '#fff',\n pointHoverBorderColor: rgba(color, 0.8)\n };\n }\n\n function getRandomInt (min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n\n function rgba (color, alpha) {\n if (usingExcanvas) {\n // rgba not supported by IE8\n return 'rgb(' + color.join(',') + ')';\n } else {\n return 'rgba(' + color.concat(alpha).join(',') + ')';\n }\n }\n\n // Credit: http://stackoverflow.com/a/11508164/1190235\n function hexToRgb (hex) {\n var bigint = parseInt(hex, 16),\n r = (bigint >> 16) & 255,\n g = (bigint >> 8) & 255,\n b = bigint & 255;\n\n return [r, g, b];\n }\n\n function getDataSets (labels, data, series, colors, yaxis) {\n return {\n labels: labels,\n datasets: data.map(function (item, i) {\n var dataset = angular.extend({}, colors[i], {\n label: series[i],\n data: item\n });\n if (yaxis) {\n dataset.yAxisID = yaxis[i];\n }\n return dataset;\n })\n };\n }\n\n function getData (labels, data, colors) {\n return {\n labels: labels,\n datasets: [{\n data: data,\n backgroundColor: colors.map(function (color) {\n return color.pointBackgroundColor;\n }),\n hoverBackgroundColor: colors.map(function (color) {\n return color.backgroundColor;\n })\n }]\n };\n }\n\n function updateChart (chart, values, scope) {\n if (Array.isArray(scope.chartData[0])) {\n chart.data.datasets.forEach(function (dataset, i) {\n dataset.data = values[i];\n });\n } else {\n chart.data.datasets[0].data = values;\n }\n\n chart.update();\n scope.$emit('chart-update', chart);\n }\n\n function isEmpty (value) {\n return ! value ||\n (Array.isArray(value) && ! value.length) ||\n (typeof value === 'object' && ! Object.keys(value).length);\n }\n\n function isResponsive (type, scope) {\n var options = angular.extend({}, Chart.defaults.global, ChartJs.getOptions(type), scope.chartOptions);\n return options.responsive;\n }\n\n function destroyChart(chart, scope) {\n if(! chart) return;\n chart.destroy();\n scope.$emit('chart-destroy', chart);\n }\n }\n}));\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/examples/charts.html b/examples/charts.html index 58d462b4..9ac373c5 100644 --- a/examples/charts.html +++ b/examples/charts.html @@ -94,7 +94,7 @@

Code on Github - Download (1.0.0-alpha4) + Download (1.0.0-alpha5)

diff --git a/package.json b/package.json index ece0211d..55e676ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-chart.js", - "version": "1.0.0-alpha4", + "version": "1.0.0-alpha5", "description": "An angular.js wrapper for Chart.js", "main": "dist/angular-chart.js", "directories": { diff --git a/test/fixtures/coverage.js b/test/fixtures/coverage.js index 678e2b3d..75f8f130 100644 --- a/test/fixtures/coverage.js +++ b/test/fixtures/coverage.js @@ -3,7 +3,7 @@ var __cov_sIM21KhAGhzWP0B7wdkh_A = (Function('return this'))(); if (!__cov_sIM21KhAGhzWP0B7wdkh_A.__coverage__) { __cov_sIM21KhAGhzWP0B7wdkh_A.__coverage__ = {}; } __cov_sIM21KhAGhzWP0B7wdkh_A = __cov_sIM21KhAGhzWP0B7wdkh_A.__coverage__; if (!(__cov_sIM21KhAGhzWP0B7wdkh_A['/src/angular-chart.js'])) { - __cov_sIM21KhAGhzWP0B7wdkh_A['/src/angular-chart.js'] = {"path":"/src/angular-chart.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":1,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":1,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":1,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":1,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":1,"92":0,"93":0,"94":0,"95":0,"96":1,"97":0,"98":1,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":1,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":1,"116":0,"117":0,"118":0,"119":0,"120":0,"121":1,"122":0,"123":0,"124":1,"125":0,"126":1,"127":0,"128":1,"129":0,"130":0,"131":0,"132":1,"133":0,"134":0,"135":1,"136":0,"137":0,"138":0,"139":0,"140":0,"141":1,"142":0,"143":0,"144":0,"145":1,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":1,"153":0,"154":1,"155":0,"156":0,"157":1,"158":0,"159":0,"160":0,"161":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0,0],"9":[0,0],"10":[0,0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0,0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0,0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0,0,0,0],"54":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":20}}},"2":{"name":"(anonymous_2)","line":17,"loc":{"start":{"line":17,"column":2},"end":{"line":17,"column":28}}},"3":{"name":"(anonymous_3)","line":43,"loc":{"start":{"line":43,"column":47},"end":{"line":43,"column":73}}},"4":{"name":"(anonymous_4)","line":44,"loc":{"start":{"line":44,"column":47},"end":{"line":44,"column":73}}},"5":{"name":"(anonymous_5)","line":45,"loc":{"start":{"line":45,"column":46},"end":{"line":45,"column":72}}},"6":{"name":"(anonymous_6)","line":46,"loc":{"start":{"line":46,"column":48},"end":{"line":46,"column":74}}},"7":{"name":"(anonymous_7)","line":47,"loc":{"start":{"line":47,"column":51},"end":{"line":47,"column":77}}},"8":{"name":"(anonymous_8)","line":48,"loc":{"start":{"line":48,"column":46},"end":{"line":48,"column":72}}},"9":{"name":"(anonymous_9)","line":49,"loc":{"start":{"line":49,"column":52},"end":{"line":49,"column":78}}},"10":{"name":"ChartJsProvider","line":60,"loc":{"start":{"line":60,"column":2},"end":{"line":60,"column":30}}},"11":{"name":"(anonymous_11)","line":64,"loc":{"start":{"line":64,"column":18},"end":{"line":64,"column":34}}},"12":{"name":"(anonymous_12)","line":73,"loc":{"start":{"line":73,"column":22},"end":{"line":73,"column":53}}},"13":{"name":"(anonymous_13)","line":84,"loc":{"start":{"line":84,"column":16},"end":{"line":84,"column":28}}},"14":{"name":"ChartJsFactory","line":89,"loc":{"start":{"line":89,"column":2},"end":{"line":89,"column":46}}},"15":{"name":"chart","line":90,"loc":{"start":{"line":90,"column":11},"end":{"line":90,"column":33}}},"16":{"name":"(anonymous_16)","line":105,"loc":{"start":{"line":105,"column":14},"end":{"line":105,"column":49}}},"17":{"name":"(anonymous_17)","line":112,"loc":{"start":{"line":112,"column":36},"end":{"line":112,"column":62}}},"18":{"name":"(anonymous_18)","line":131,"loc":{"start":{"line":131,"column":36},"end":{"line":131,"column":62}}},"19":{"name":"(anonymous_19)","line":137,"loc":{"start":{"line":137,"column":32},"end":{"line":137,"column":44}}},"20":{"name":"resetChart","line":141,"loc":{"start":{"line":141,"column":10},"end":{"line":141,"column":47}}},"21":{"name":"createChart","line":152,"loc":{"start":{"line":152,"column":10},"end":{"line":152,"column":38}}},"22":{"name":"(anonymous_22)","line":155,"loc":{"start":{"line":155,"column":30},"end":{"line":155,"column":42}}},"23":{"name":"canUpdateChart","line":187,"loc":{"start":{"line":187,"column":4},"end":{"line":187,"column":45}}},"24":{"name":"(anonymous_24)","line":190,"loc":{"start":{"line":190,"column":56},"end":{"line":190,"column":82}}},"25":{"name":"sum","line":197,"loc":{"start":{"line":197,"column":4},"end":{"line":197,"column":30}}},"26":{"name":"getEventHandler","line":201,"loc":{"start":{"line":201,"column":4},"end":{"line":201,"column":73}}},"27":{"name":"(anonymous_27)","line":203,"loc":{"start":{"line":203,"column":13},"end":{"line":203,"column":28}}},"28":{"name":"getColors","line":215,"loc":{"start":{"line":215,"column":4},"end":{"line":215,"column":37}}},"29":{"name":"convertColor","line":230,"loc":{"start":{"line":230,"column":4},"end":{"line":230,"column":34}}},"30":{"name":"getRandomColor","line":236,"loc":{"start":{"line":236,"column":4},"end":{"line":236,"column":31}}},"31":{"name":"getColor","line":241,"loc":{"start":{"line":241,"column":4},"end":{"line":241,"column":30}}},"32":{"name":"getRandomInt","line":252,"loc":{"start":{"line":252,"column":4},"end":{"line":252,"column":37}}},"33":{"name":"rgba","line":256,"loc":{"start":{"line":256,"column":4},"end":{"line":256,"column":33}}},"34":{"name":"hexToRgb","line":266,"loc":{"start":{"line":266,"column":4},"end":{"line":266,"column":28}}},"35":{"name":"getDataSets","line":275,"loc":{"start":{"line":275,"column":4},"end":{"line":275,"column":63}}},"36":{"name":"(anonymous_36)","line":278,"loc":{"start":{"line":278,"column":27},"end":{"line":278,"column":46}}},"37":{"name":"getData","line":291,"loc":{"start":{"line":291,"column":4},"end":{"line":291,"column":44}}},"38":{"name":"(anonymous_38)","line":296,"loc":{"start":{"line":296,"column":38},"end":{"line":296,"column":55}}},"39":{"name":"(anonymous_39)","line":299,"loc":{"start":{"line":299,"column":43},"end":{"line":299,"column":60}}},"40":{"name":"updateChart","line":306,"loc":{"start":{"line":306,"column":4},"end":{"line":306,"column":48}}},"41":{"name":"(anonymous_41)","line":308,"loc":{"start":{"line":308,"column":36},"end":{"line":308,"column":58}}},"42":{"name":"isEmpty","line":319,"loc":{"start":{"line":319,"column":4},"end":{"line":319,"column":29}}},"43":{"name":"isResponsive","line":325,"loc":{"start":{"line":325,"column":4},"end":{"line":325,"column":40}}},"44":{"name":"destroyChart","line":330,"loc":{"start":{"line":330,"column":4},"end":{"line":330,"column":40}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":336,"column":4}},"2":{"start":{"line":3,"column":2},"end":{"line":16,"column":3}},"3":{"start":{"line":5,"column":4},"end":{"line":7,"column":66}},"4":{"start":{"line":8,"column":10},"end":{"line":16,"column":3}},"5":{"start":{"line":10,"column":4},"end":{"line":10,"column":42}},"6":{"start":{"line":13,"column":4},"end":{"line":14,"column":55}},"7":{"start":{"line":13,"column":72},"end":{"line":14,"column":55}},"8":{"start":{"line":15,"column":4},"end":{"line":15,"column":28}},"9":{"start":{"line":20,"column":2},"end":{"line":20,"column":108}},"10":{"start":{"line":21,"column":2},"end":{"line":21,"column":54}},"11":{"start":{"line":22,"column":2},"end":{"line":22,"column":59}},"12":{"start":{"line":23,"column":2},"end":{"line":23,"column":47}},"13":{"start":{"line":24,"column":2},"end":{"line":32,"column":4}},"14":{"start":{"line":34,"column":2},"end":{"line":36,"column":64}},"15":{"start":{"line":38,"column":2},"end":{"line":38,"column":61}},"16":{"start":{"line":38,"column":21},"end":{"line":38,"column":61}},"17":{"start":{"line":40,"column":2},"end":{"line":49,"column":124}},"18":{"start":{"line":43,"column":75},"end":{"line":43,"column":103}},"19":{"start":{"line":44,"column":75},"end":{"line":44,"column":109}},"20":{"start":{"line":45,"column":74},"end":{"line":45,"column":107}},"21":{"start":{"line":46,"column":76},"end":{"line":46,"column":111}},"22":{"start":{"line":47,"column":79},"end":{"line":47,"column":117}},"23":{"start":{"line":48,"column":74},"end":{"line":48,"column":107}},"24":{"start":{"line":49,"column":80},"end":{"line":49,"column":119}},"25":{"start":{"line":60,"column":2},"end":{"line":87,"column":3}},"26":{"start":{"line":61,"column":4},"end":{"line":61,"column":21}},"27":{"start":{"line":62,"column":4},"end":{"line":68,"column":6}},"28":{"start":{"line":65,"column":8},"end":{"line":65,"column":54}},"29":{"start":{"line":66,"column":8},"end":{"line":66,"column":56}},"30":{"start":{"line":73,"column":4},"end":{"line":82,"column":6}},"31":{"start":{"line":75,"column":6},"end":{"line":79,"column":7}},"32":{"start":{"line":76,"column":8},"end":{"line":76,"column":29}},"33":{"start":{"line":77,"column":8},"end":{"line":77,"column":57}},"34":{"start":{"line":78,"column":8},"end":{"line":78,"column":15}},"35":{"start":{"line":81,"column":6},"end":{"line":81,"column":73}},"36":{"start":{"line":84,"column":4},"end":{"line":86,"column":6}},"37":{"start":{"line":85,"column":6},"end":{"line":85,"column":21}},"38":{"start":{"line":89,"column":2},"end":{"line":335,"column":3}},"39":{"start":{"line":90,"column":4},"end":{"line":185,"column":6}},"40":{"start":{"line":91,"column":6},"end":{"line":184,"column":8}},"41":{"start":{"line":106,"column":10},"end":{"line":106,"column":20}},"42":{"start":{"line":108,"column":10},"end":{"line":108,"column":76}},"43":{"start":{"line":108,"column":29},"end":{"line":108,"column":76}},"44":{"start":{"line":112,"column":10},"end":{"line":124,"column":19}},"45":{"start":{"line":113,"column":12},"end":{"line":116,"column":13}},"46":{"start":{"line":114,"column":14},"end":{"line":114,"column":41}},"47":{"start":{"line":115,"column":14},"end":{"line":115,"column":21}},"48":{"start":{"line":117,"column":12},"end":{"line":117,"column":52}},"49":{"start":{"line":118,"column":12},"end":{"line":118,"column":36}},"50":{"start":{"line":118,"column":29},"end":{"line":118,"column":36}},"51":{"start":{"line":120,"column":12},"end":{"line":121,"column":55}},"52":{"start":{"line":121,"column":14},"end":{"line":121,"column":55}},"53":{"start":{"line":123,"column":12},"end":{"line":123,"column":35}},"54":{"start":{"line":126,"column":10},"end":{"line":126,"column":56}},"55":{"start":{"line":127,"column":10},"end":{"line":127,"column":56}},"56":{"start":{"line":128,"column":10},"end":{"line":128,"column":57}},"57":{"start":{"line":129,"column":10},"end":{"line":129,"column":56}},"58":{"start":{"line":131,"column":10},"end":{"line":135,"column":13}},"59":{"start":{"line":132,"column":12},"end":{"line":132,"column":40}},"60":{"start":{"line":132,"column":33},"end":{"line":132,"column":40}},"61":{"start":{"line":133,"column":12},"end":{"line":133,"column":55}},"62":{"start":{"line":133,"column":48},"end":{"line":133,"column":55}},"63":{"start":{"line":134,"column":12},"end":{"line":134,"column":32}},"64":{"start":{"line":137,"column":10},"end":{"line":139,"column":13}},"65":{"start":{"line":138,"column":12},"end":{"line":138,"column":39}},"66":{"start":{"line":141,"column":10},"end":{"line":150,"column":11}},"67":{"start":{"line":142,"column":12},"end":{"line":142,"column":40}},"68":{"start":{"line":142,"column":33},"end":{"line":142,"column":40}},"69":{"start":{"line":143,"column":12},"end":{"line":143,"column":55}},"70":{"start":{"line":143,"column":48},"end":{"line":143,"column":55}},"71":{"start":{"line":144,"column":12},"end":{"line":144,"column":52}},"72":{"start":{"line":145,"column":12},"end":{"line":145,"column":36}},"73":{"start":{"line":145,"column":29},"end":{"line":145,"column":36}},"74":{"start":{"line":149,"column":12},"end":{"line":149,"column":35}},"75":{"start":{"line":152,"column":10},"end":{"line":182,"column":11}},"76":{"start":{"line":154,"column":12},"end":{"line":158,"column":13}},"77":{"start":{"line":155,"column":14},"end":{"line":157,"column":28}},"78":{"start":{"line":156,"column":16},"end":{"line":156,"column":34}},"79":{"start":{"line":159,"column":12},"end":{"line":159,"column":70}},"80":{"start":{"line":159,"column":63},"end":{"line":159,"column":70}},"81":{"start":{"line":160,"column":12},"end":{"line":160,"column":115}},"82":{"start":{"line":161,"column":12},"end":{"line":161,"column":48}},"83":{"start":{"line":162,"column":12},"end":{"line":162,"column":58}},"84":{"start":{"line":163,"column":12},"end":{"line":165,"column":66}},"85":{"start":{"line":167,"column":12},"end":{"line":167,"column":91}},"86":{"start":{"line":170,"column":12},"end":{"line":170,"column":39}},"87":{"start":{"line":172,"column":12},"end":{"line":176,"column":15}},"88":{"start":{"line":177,"column":12},"end":{"line":177,"column":47}},"89":{"start":{"line":180,"column":12},"end":{"line":180,"column":111}},"90":{"start":{"line":181,"column":12},"end":{"line":181,"column":114}},"91":{"start":{"line":187,"column":4},"end":{"line":195,"column":5}},"92":{"start":{"line":188,"column":6},"end":{"line":193,"column":7}},"93":{"start":{"line":189,"column":8},"end":{"line":192,"column":78}},"94":{"start":{"line":191,"column":10},"end":{"line":191,"column":57}},"95":{"start":{"line":194,"column":6},"end":{"line":194,"column":19}},"96":{"start":{"line":197,"column":4},"end":{"line":199,"column":5}},"97":{"start":{"line":198,"column":6},"end":{"line":198,"column":25}},"98":{"start":{"line":201,"column":4},"end":{"line":213,"column":5}},"99":{"start":{"line":202,"column":6},"end":{"line":202,"column":27}},"100":{"start":{"line":203,"column":6},"end":{"line":212,"column":8}},"101":{"start":{"line":204,"column":8},"end":{"line":204,"column":73}},"102":{"start":{"line":205,"column":8},"end":{"line":211,"column":9}},"103":{"start":{"line":206,"column":10},"end":{"line":206,"column":54}},"104":{"start":{"line":207,"column":10},"end":{"line":210,"column":11}},"105":{"start":{"line":208,"column":12},"end":{"line":208,"column":37}},"106":{"start":{"line":209,"column":12},"end":{"line":209,"column":45}},"107":{"start":{"line":215,"column":4},"end":{"line":228,"column":5}},"108":{"start":{"line":216,"column":6},"end":{"line":219,"column":8}},"109":{"start":{"line":220,"column":6},"end":{"line":220,"column":67}},"110":{"start":{"line":221,"column":6},"end":{"line":223,"column":7}},"111":{"start":{"line":222,"column":8},"end":{"line":222,"column":43}},"112":{"start":{"line":226,"column":6},"end":{"line":226,"column":54}},"113":{"start":{"line":226,"column":27},"end":{"line":226,"column":54}},"114":{"start":{"line":227,"column":6},"end":{"line":227,"column":38}},"115":{"start":{"line":230,"column":4},"end":{"line":234,"column":5}},"116":{"start":{"line":231,"column":6},"end":{"line":231,"column":68}},"117":{"start":{"line":231,"column":55},"end":{"line":231,"column":68}},"118":{"start":{"line":232,"column":6},"end":{"line":232,"column":100}},"119":{"start":{"line":232,"column":57},"end":{"line":232,"column":100}},"120":{"start":{"line":233,"column":6},"end":{"line":233,"column":30}},"121":{"start":{"line":236,"column":4},"end":{"line":239,"column":5}},"122":{"start":{"line":237,"column":6},"end":{"line":237,"column":85}},"123":{"start":{"line":238,"column":6},"end":{"line":238,"column":29}},"124":{"start":{"line":241,"column":4},"end":{"line":250,"column":5}},"125":{"start":{"line":242,"column":6},"end":{"line":249,"column":8}},"126":{"start":{"line":252,"column":4},"end":{"line":254,"column":5}},"127":{"start":{"line":253,"column":6},"end":{"line":253,"column":63}},"128":{"start":{"line":256,"column":4},"end":{"line":263,"column":5}},"129":{"start":{"line":257,"column":6},"end":{"line":262,"column":7}},"130":{"start":{"line":259,"column":8},"end":{"line":259,"column":46}},"131":{"start":{"line":261,"column":8},"end":{"line":261,"column":61}},"132":{"start":{"line":266,"column":4},"end":{"line":273,"column":5}},"133":{"start":{"line":267,"column":6},"end":{"line":270,"column":25}},"134":{"start":{"line":272,"column":6},"end":{"line":272,"column":23}},"135":{"start":{"line":275,"column":4},"end":{"line":289,"column":5}},"136":{"start":{"line":276,"column":6},"end":{"line":288,"column":8}},"137":{"start":{"line":279,"column":10},"end":{"line":282,"column":13}},"138":{"start":{"line":283,"column":10},"end":{"line":285,"column":11}},"139":{"start":{"line":284,"column":12},"end":{"line":284,"column":50}},"140":{"start":{"line":286,"column":10},"end":{"line":286,"column":25}},"141":{"start":{"line":291,"column":4},"end":{"line":304,"column":5}},"142":{"start":{"line":292,"column":6},"end":{"line":303,"column":8}},"143":{"start":{"line":297,"column":12},"end":{"line":297,"column":46}},"144":{"start":{"line":300,"column":12},"end":{"line":300,"column":41}},"145":{"start":{"line":306,"column":4},"end":{"line":317,"column":5}},"146":{"start":{"line":307,"column":6},"end":{"line":313,"column":7}},"147":{"start":{"line":308,"column":8},"end":{"line":310,"column":11}},"148":{"start":{"line":309,"column":10},"end":{"line":309,"column":35}},"149":{"start":{"line":312,"column":8},"end":{"line":312,"column":45}},"150":{"start":{"line":315,"column":6},"end":{"line":315,"column":21}},"151":{"start":{"line":316,"column":6},"end":{"line":316,"column":41}},"152":{"start":{"line":319,"column":4},"end":{"line":323,"column":5}},"153":{"start":{"line":320,"column":6},"end":{"line":322,"column":67}},"154":{"start":{"line":325,"column":4},"end":{"line":328,"column":5}},"155":{"start":{"line":326,"column":6},"end":{"line":326,"column":108}},"156":{"start":{"line":327,"column":6},"end":{"line":327,"column":32}},"157":{"start":{"line":330,"column":4},"end":{"line":334,"column":5}},"158":{"start":{"line":331,"column":6},"end":{"line":331,"column":25}},"159":{"start":{"line":331,"column":18},"end":{"line":331,"column":25}},"160":{"start":{"line":332,"column":6},"end":{"line":332,"column":22}},"161":{"start":{"line":333,"column":6},"end":{"line":333,"column":42}}},"branchMap":{"1":{"line":3,"type":"if","locations":[{"start":{"line":3,"column":2},"end":{"line":3,"column":2}},{"start":{"line":3,"column":2},"end":{"line":3,"column":2}}]},"2":{"line":6,"type":"cond-expr","locations":[{"start":{"line":6,"column":39},"end":{"line":6,"column":46}},{"start":{"line":6,"column":49},"end":{"line":6,"column":67}}]},"3":{"line":7,"type":"cond-expr","locations":[{"start":{"line":7,"column":37},"end":{"line":7,"column":42}},{"start":{"line":7,"column":45},"end":{"line":7,"column":64}}]},"4":{"line":8,"type":"if","locations":[{"start":{"line":8,"column":10},"end":{"line":8,"column":10}},{"start":{"line":8,"column":10},"end":{"line":8,"column":10}}]},"5":{"line":8,"type":"binary-expr","locations":[{"start":{"line":8,"column":14},"end":{"line":8,"column":42}},{"start":{"line":8,"column":46},"end":{"line":8,"column":56}}]},"6":{"line":13,"type":"if","locations":[{"start":{"line":13,"column":4},"end":{"line":13,"column":4}},{"start":{"line":13,"column":4},"end":{"line":13,"column":4}}]},"7":{"line":13,"type":"binary-expr","locations":[{"start":{"line":13,"column":8},"end":{"line":13,"column":38}},{"start":{"line":13,"column":42},"end":{"line":13,"column":70}}]},"8":{"line":34,"type":"binary-expr","locations":[{"start":{"line":34,"column":22},"end":{"line":34,"column":67}},{"start":{"line":35,"column":4},"end":{"line":35,"column":38}},{"start":{"line":36,"column":4},"end":{"line":36,"column":63}}]},"9":{"line":38,"type":"if","locations":[{"start":{"line":38,"column":2},"end":{"line":38,"column":2}},{"start":{"line":38,"column":2},"end":{"line":38,"column":2}}]},"10":{"line":65,"type":"binary-expr","locations":[{"start":{"line":65,"column":26},"end":{"line":65,"column":30}},{"start":{"line":65,"column":34},"end":{"line":65,"column":47}},{"start":{"line":65,"column":51},"end":{"line":65,"column":53}}]},"11":{"line":75,"type":"if","locations":[{"start":{"line":75,"column":6},"end":{"line":75,"column":6}},{"start":{"line":75,"column":6},"end":{"line":75,"column":6}}]},"12":{"line":81,"type":"binary-expr","locations":[{"start":{"line":81,"column":37},"end":{"line":81,"column":50}},{"start":{"line":81,"column":54},"end":{"line":81,"column":56}}]},"13":{"line":108,"type":"if","locations":[{"start":{"line":108,"column":10},"end":{"line":108,"column":10}},{"start":{"line":108,"column":10},"end":{"line":108,"column":10}}]},"14":{"line":113,"type":"if","locations":[{"start":{"line":113,"column":12},"end":{"line":113,"column":12}},{"start":{"line":113,"column":12},"end":{"line":113,"column":12}}]},"15":{"line":113,"type":"binary-expr","locations":[{"start":{"line":113,"column":16},"end":{"line":113,"column":24}},{"start":{"line":113,"column":28},"end":{"line":113,"column":43}},{"start":{"line":113,"column":48},"end":{"line":113,"column":72}},{"start":{"line":113,"column":76},"end":{"line":113,"column":94}}]},"16":{"line":117,"type":"binary-expr","locations":[{"start":{"line":117,"column":28},"end":{"line":117,"column":32}},{"start":{"line":117,"column":36},"end":{"line":117,"column":51}}]},"17":{"line":118,"type":"if","locations":[{"start":{"line":118,"column":12},"end":{"line":118,"column":12}},{"start":{"line":118,"column":12},"end":{"line":118,"column":12}}]},"18":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":12},"end":{"line":120,"column":12}},{"start":{"line":120,"column":12},"end":{"line":120,"column":12}}]},"19":{"line":120,"type":"binary-expr","locations":[{"start":{"line":120,"column":16},"end":{"line":120,"column":21}},{"start":{"line":120,"column":25},"end":{"line":120,"column":55}}]},"20":{"line":132,"type":"if","locations":[{"start":{"line":132,"column":12},"end":{"line":132,"column":12}},{"start":{"line":132,"column":12},"end":{"line":132,"column":12}}]},"21":{"line":133,"type":"if","locations":[{"start":{"line":133,"column":12},"end":{"line":133,"column":12}},{"start":{"line":133,"column":12},"end":{"line":133,"column":12}}]},"22":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":12},"end":{"line":142,"column":12}},{"start":{"line":142,"column":12},"end":{"line":142,"column":12}}]},"23":{"line":143,"type":"if","locations":[{"start":{"line":143,"column":12},"end":{"line":143,"column":12}},{"start":{"line":143,"column":12},"end":{"line":143,"column":12}}]},"24":{"line":144,"type":"binary-expr","locations":[{"start":{"line":144,"column":28},"end":{"line":144,"column":32}},{"start":{"line":144,"column":36},"end":{"line":144,"column":51}}]},"25":{"line":145,"type":"if","locations":[{"start":{"line":145,"column":12},"end":{"line":145,"column":12}},{"start":{"line":145,"column":12},"end":{"line":145,"column":12}}]},"26":{"line":154,"type":"if","locations":[{"start":{"line":154,"column":12},"end":{"line":154,"column":12}},{"start":{"line":154,"column":12},"end":{"line":154,"column":12}}]},"27":{"line":154,"type":"binary-expr","locations":[{"start":{"line":154,"column":16},"end":{"line":154,"column":41}},{"start":{"line":154,"column":45},"end":{"line":154,"column":71}}]},"28":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":12},"end":{"line":159,"column":12}},{"start":{"line":159,"column":12},"end":{"line":159,"column":12}}]},"29":{"line":159,"type":"binary-expr","locations":[{"start":{"line":159,"column":16},"end":{"line":159,"column":33}},{"start":{"line":159,"column":37},"end":{"line":159,"column":61}}]},"30":{"line":160,"type":"cond-expr","locations":[{"start":{"line":160,"column":78},"end":{"line":160,"column":97}},{"start":{"line":160,"column":100},"end":{"line":160,"column":114}}]},"31":{"line":163,"type":"cond-expr","locations":[{"start":{"line":164,"column":14},"end":{"line":164,"column":112}},{"start":{"line":165,"column":14},"end":{"line":165,"column":65}}]},"32":{"line":164,"type":"binary-expr","locations":[{"start":{"line":164,"column":62},"end":{"line":164,"column":79}},{"start":{"line":164,"column":83},"end":{"line":164,"column":85}}]},"33":{"line":180,"type":"cond-expr","locations":[{"start":{"line":180,"column":45},"end":{"line":180,"column":95}},{"start":{"line":180,"column":98},"end":{"line":180,"column":110}}]},"34":{"line":181,"type":"cond-expr","locations":[{"start":{"line":181,"column":49},"end":{"line":181,"column":98}},{"start":{"line":181,"column":101},"end":{"line":181,"column":113}}]},"35":{"line":188,"type":"if","locations":[{"start":{"line":188,"column":6},"end":{"line":188,"column":6}},{"start":{"line":188,"column":6},"end":{"line":188,"column":6}}]},"36":{"line":188,"type":"binary-expr","locations":[{"start":{"line":188,"column":10},"end":{"line":188,"column":16}},{"start":{"line":188,"column":20},"end":{"line":188,"column":26}},{"start":{"line":188,"column":30},"end":{"line":188,"column":43}},{"start":{"line":188,"column":47},"end":{"line":188,"column":60}}]},"37":{"line":189,"type":"cond-expr","locations":[{"start":{"line":190,"column":8},"end":{"line":191,"column":60}},{"start":{"line":192,"column":10},"end":{"line":192,"column":77}}]},"38":{"line":190,"type":"binary-expr","locations":[{"start":{"line":190,"column":8},"end":{"line":190,"column":39}},{"start":{"line":190,"column":43},"end":{"line":191,"column":60}}]},"39":{"line":192,"type":"cond-expr","locations":[{"start":{"line":192,"column":38},"end":{"line":192,"column":69}},{"start":{"line":192,"column":72},"end":{"line":192,"column":77}}]},"40":{"line":204,"type":"binary-expr","locations":[{"start":{"line":204,"column":22},"end":{"line":204,"column":46}},{"start":{"line":204,"column":50},"end":{"line":204,"column":72}}]},"41":{"line":205,"type":"if","locations":[{"start":{"line":205,"column":8},"end":{"line":205,"column":8}},{"start":{"line":205,"column":8},"end":{"line":205,"column":8}}]},"42":{"line":207,"type":"if","locations":[{"start":{"line":207,"column":10},"end":{"line":207,"column":10}},{"start":{"line":207,"column":10},"end":{"line":207,"column":10}}]},"43":{"line":207,"type":"binary-expr","locations":[{"start":{"line":207,"column":14},"end":{"line":207,"column":43}},{"start":{"line":207,"column":47},"end":{"line":207,"column":96}}]},"44":{"line":216,"type":"binary-expr","locations":[{"start":{"line":216,"column":32},"end":{"line":216,"column":49}},{"start":{"line":217,"column":8},"end":{"line":217,"column":44}},{"start":{"line":218,"column":8},"end":{"line":218,"column":36}}]},"45":{"line":226,"type":"if","locations":[{"start":{"line":226,"column":6},"end":{"line":226,"column":6}},{"start":{"line":226,"column":6},"end":{"line":226,"column":6}}]},"46":{"line":231,"type":"if","locations":[{"start":{"line":231,"column":6},"end":{"line":231,"column":6}},{"start":{"line":231,"column":6},"end":{"line":231,"column":6}}]},"47":{"line":231,"type":"binary-expr","locations":[{"start":{"line":231,"column":10},"end":{"line":231,"column":35}},{"start":{"line":231,"column":39},"end":{"line":231,"column":53}}]},"48":{"line":232,"type":"if","locations":[{"start":{"line":232,"column":6},"end":{"line":232,"column":6}},{"start":{"line":232,"column":6},"end":{"line":232,"column":6}}]},"49":{"line":232,"type":"binary-expr","locations":[{"start":{"line":232,"column":10},"end":{"line":232,"column":35}},{"start":{"line":232,"column":39},"end":{"line":232,"column":55}}]},"50":{"line":257,"type":"if","locations":[{"start":{"line":257,"column":6},"end":{"line":257,"column":6}},{"start":{"line":257,"column":6},"end":{"line":257,"column":6}}]},"51":{"line":283,"type":"if","locations":[{"start":{"line":283,"column":10},"end":{"line":283,"column":10}},{"start":{"line":283,"column":10},"end":{"line":283,"column":10}}]},"52":{"line":307,"type":"if","locations":[{"start":{"line":307,"column":6},"end":{"line":307,"column":6}},{"start":{"line":307,"column":6},"end":{"line":307,"column":6}}]},"53":{"line":320,"type":"binary-expr","locations":[{"start":{"line":320,"column":13},"end":{"line":320,"column":20}},{"start":{"line":321,"column":9},"end":{"line":321,"column":29}},{"start":{"line":321,"column":33},"end":{"line":321,"column":47}},{"start":{"line":322,"column":9},"end":{"line":322,"column":34}},{"start":{"line":322,"column":38},"end":{"line":322,"column":65}}]},"54":{"line":331,"type":"if","locations":[{"start":{"line":331,"column":6},"end":{"line":331,"column":6}},{"start":{"line":331,"column":6},"end":{"line":331,"column":6}}]}}}; + __cov_sIM21KhAGhzWP0B7wdkh_A['/src/angular-chart.js'] = {"path":"/src/angular-chart.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":1,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":1,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":1,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":1,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":1,"92":0,"93":0,"94":0,"95":0,"96":1,"97":0,"98":1,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":1,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":1,"116":0,"117":0,"118":0,"119":0,"120":0,"121":1,"122":0,"123":0,"124":1,"125":0,"126":1,"127":0,"128":1,"129":0,"130":0,"131":0,"132":1,"133":0,"134":0,"135":1,"136":0,"137":0,"138":0,"139":0,"140":0,"141":1,"142":0,"143":0,"144":0,"145":1,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":1,"153":0,"154":1,"155":0,"156":0,"157":1,"158":0,"159":0,"160":0,"161":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0,0],"9":[0,0],"10":[0,0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0,0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0,0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0,0,0,0],"54":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":1},"end":{"line":1,"column":20}}},"2":{"name":"(anonymous_2)","line":17,"loc":{"start":{"line":17,"column":2},"end":{"line":17,"column":28}}},"3":{"name":"(anonymous_3)","line":43,"loc":{"start":{"line":43,"column":47},"end":{"line":43,"column":73}}},"4":{"name":"(anonymous_4)","line":44,"loc":{"start":{"line":44,"column":47},"end":{"line":44,"column":73}}},"5":{"name":"(anonymous_5)","line":45,"loc":{"start":{"line":45,"column":46},"end":{"line":45,"column":72}}},"6":{"name":"(anonymous_6)","line":46,"loc":{"start":{"line":46,"column":48},"end":{"line":46,"column":74}}},"7":{"name":"(anonymous_7)","line":47,"loc":{"start":{"line":47,"column":51},"end":{"line":47,"column":77}}},"8":{"name":"(anonymous_8)","line":48,"loc":{"start":{"line":48,"column":46},"end":{"line":48,"column":72}}},"9":{"name":"(anonymous_9)","line":49,"loc":{"start":{"line":49,"column":52},"end":{"line":49,"column":78}}},"10":{"name":"ChartJsProvider","line":60,"loc":{"start":{"line":60,"column":2},"end":{"line":60,"column":30}}},"11":{"name":"(anonymous_11)","line":64,"loc":{"start":{"line":64,"column":18},"end":{"line":64,"column":34}}},"12":{"name":"(anonymous_12)","line":73,"loc":{"start":{"line":73,"column":22},"end":{"line":73,"column":53}}},"13":{"name":"(anonymous_13)","line":84,"loc":{"start":{"line":84,"column":16},"end":{"line":84,"column":28}}},"14":{"name":"ChartJsFactory","line":89,"loc":{"start":{"line":89,"column":2},"end":{"line":89,"column":46}}},"15":{"name":"chart","line":90,"loc":{"start":{"line":90,"column":11},"end":{"line":90,"column":33}}},"16":{"name":"(anonymous_16)","line":105,"loc":{"start":{"line":105,"column":14},"end":{"line":105,"column":49}}},"17":{"name":"(anonymous_17)","line":112,"loc":{"start":{"line":112,"column":36},"end":{"line":112,"column":62}}},"18":{"name":"(anonymous_18)","line":131,"loc":{"start":{"line":131,"column":36},"end":{"line":131,"column":62}}},"19":{"name":"(anonymous_19)","line":137,"loc":{"start":{"line":137,"column":32},"end":{"line":137,"column":44}}},"20":{"name":"resetChart","line":141,"loc":{"start":{"line":141,"column":10},"end":{"line":141,"column":47}}},"21":{"name":"createChart","line":152,"loc":{"start":{"line":152,"column":10},"end":{"line":152,"column":38}}},"22":{"name":"(anonymous_22)","line":155,"loc":{"start":{"line":155,"column":30},"end":{"line":155,"column":42}}},"23":{"name":"canUpdateChart","line":187,"loc":{"start":{"line":187,"column":4},"end":{"line":187,"column":45}}},"24":{"name":"(anonymous_24)","line":190,"loc":{"start":{"line":190,"column":56},"end":{"line":190,"column":82}}},"25":{"name":"sum","line":197,"loc":{"start":{"line":197,"column":4},"end":{"line":197,"column":30}}},"26":{"name":"getEventHandler","line":201,"loc":{"start":{"line":201,"column":4},"end":{"line":201,"column":73}}},"27":{"name":"(anonymous_27)","line":203,"loc":{"start":{"line":203,"column":13},"end":{"line":203,"column":28}}},"28":{"name":"getColors","line":215,"loc":{"start":{"line":215,"column":4},"end":{"line":215,"column":37}}},"29":{"name":"convertColor","line":230,"loc":{"start":{"line":230,"column":4},"end":{"line":230,"column":34}}},"30":{"name":"getRandomColor","line":236,"loc":{"start":{"line":236,"column":4},"end":{"line":236,"column":31}}},"31":{"name":"getColor","line":241,"loc":{"start":{"line":241,"column":4},"end":{"line":241,"column":30}}},"32":{"name":"getRandomInt","line":252,"loc":{"start":{"line":252,"column":4},"end":{"line":252,"column":37}}},"33":{"name":"rgba","line":256,"loc":{"start":{"line":256,"column":4},"end":{"line":256,"column":33}}},"34":{"name":"hexToRgb","line":266,"loc":{"start":{"line":266,"column":4},"end":{"line":266,"column":28}}},"35":{"name":"getDataSets","line":275,"loc":{"start":{"line":275,"column":4},"end":{"line":275,"column":63}}},"36":{"name":"(anonymous_36)","line":278,"loc":{"start":{"line":278,"column":27},"end":{"line":278,"column":46}}},"37":{"name":"getData","line":291,"loc":{"start":{"line":291,"column":4},"end":{"line":291,"column":44}}},"38":{"name":"(anonymous_38)","line":296,"loc":{"start":{"line":296,"column":38},"end":{"line":296,"column":55}}},"39":{"name":"(anonymous_39)","line":299,"loc":{"start":{"line":299,"column":43},"end":{"line":299,"column":60}}},"40":{"name":"updateChart","line":306,"loc":{"start":{"line":306,"column":4},"end":{"line":306,"column":48}}},"41":{"name":"(anonymous_41)","line":308,"loc":{"start":{"line":308,"column":36},"end":{"line":308,"column":58}}},"42":{"name":"isEmpty","line":319,"loc":{"start":{"line":319,"column":4},"end":{"line":319,"column":29}}},"43":{"name":"isResponsive","line":325,"loc":{"start":{"line":325,"column":4},"end":{"line":325,"column":40}}},"44":{"name":"destroyChart","line":330,"loc":{"start":{"line":330,"column":4},"end":{"line":330,"column":40}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":336,"column":4}},"2":{"start":{"line":3,"column":2},"end":{"line":16,"column":3}},"3":{"start":{"line":5,"column":4},"end":{"line":7,"column":66}},"4":{"start":{"line":8,"column":10},"end":{"line":16,"column":3}},"5":{"start":{"line":10,"column":4},"end":{"line":10,"column":42}},"6":{"start":{"line":13,"column":4},"end":{"line":14,"column":55}},"7":{"start":{"line":13,"column":72},"end":{"line":14,"column":55}},"8":{"start":{"line":15,"column":4},"end":{"line":15,"column":28}},"9":{"start":{"line":20,"column":2},"end":{"line":20,"column":108}},"10":{"start":{"line":21,"column":2},"end":{"line":21,"column":54}},"11":{"start":{"line":22,"column":2},"end":{"line":22,"column":59}},"12":{"start":{"line":23,"column":2},"end":{"line":23,"column":47}},"13":{"start":{"line":24,"column":2},"end":{"line":32,"column":4}},"14":{"start":{"line":34,"column":2},"end":{"line":36,"column":64}},"15":{"start":{"line":38,"column":2},"end":{"line":38,"column":61}},"16":{"start":{"line":38,"column":21},"end":{"line":38,"column":61}},"17":{"start":{"line":40,"column":2},"end":{"line":49,"column":124}},"18":{"start":{"line":43,"column":75},"end":{"line":43,"column":103}},"19":{"start":{"line":44,"column":75},"end":{"line":44,"column":109}},"20":{"start":{"line":45,"column":74},"end":{"line":45,"column":107}},"21":{"start":{"line":46,"column":76},"end":{"line":46,"column":111}},"22":{"start":{"line":47,"column":79},"end":{"line":47,"column":117}},"23":{"start":{"line":48,"column":74},"end":{"line":48,"column":107}},"24":{"start":{"line":49,"column":80},"end":{"line":49,"column":119}},"25":{"start":{"line":60,"column":2},"end":{"line":87,"column":3}},"26":{"start":{"line":61,"column":4},"end":{"line":61,"column":21}},"27":{"start":{"line":62,"column":4},"end":{"line":68,"column":6}},"28":{"start":{"line":65,"column":8},"end":{"line":65,"column":54}},"29":{"start":{"line":66,"column":8},"end":{"line":66,"column":56}},"30":{"start":{"line":73,"column":4},"end":{"line":82,"column":6}},"31":{"start":{"line":75,"column":6},"end":{"line":79,"column":7}},"32":{"start":{"line":76,"column":8},"end":{"line":76,"column":29}},"33":{"start":{"line":77,"column":8},"end":{"line":77,"column":57}},"34":{"start":{"line":78,"column":8},"end":{"line":78,"column":15}},"35":{"start":{"line":81,"column":6},"end":{"line":81,"column":73}},"36":{"start":{"line":84,"column":4},"end":{"line":86,"column":6}},"37":{"start":{"line":85,"column":6},"end":{"line":85,"column":21}},"38":{"start":{"line":89,"column":2},"end":{"line":335,"column":3}},"39":{"start":{"line":90,"column":4},"end":{"line":185,"column":6}},"40":{"start":{"line":91,"column":6},"end":{"line":184,"column":8}},"41":{"start":{"line":106,"column":10},"end":{"line":106,"column":20}},"42":{"start":{"line":108,"column":10},"end":{"line":108,"column":76}},"43":{"start":{"line":108,"column":29},"end":{"line":108,"column":76}},"44":{"start":{"line":112,"column":10},"end":{"line":124,"column":19}},"45":{"start":{"line":113,"column":12},"end":{"line":116,"column":13}},"46":{"start":{"line":114,"column":14},"end":{"line":114,"column":41}},"47":{"start":{"line":115,"column":14},"end":{"line":115,"column":21}},"48":{"start":{"line":117,"column":12},"end":{"line":117,"column":52}},"49":{"start":{"line":118,"column":12},"end":{"line":118,"column":36}},"50":{"start":{"line":118,"column":29},"end":{"line":118,"column":36}},"51":{"start":{"line":120,"column":12},"end":{"line":121,"column":55}},"52":{"start":{"line":121,"column":14},"end":{"line":121,"column":55}},"53":{"start":{"line":123,"column":12},"end":{"line":123,"column":35}},"54":{"start":{"line":126,"column":10},"end":{"line":126,"column":56}},"55":{"start":{"line":127,"column":10},"end":{"line":127,"column":56}},"56":{"start":{"line":128,"column":10},"end":{"line":128,"column":57}},"57":{"start":{"line":129,"column":10},"end":{"line":129,"column":56}},"58":{"start":{"line":131,"column":10},"end":{"line":135,"column":13}},"59":{"start":{"line":132,"column":12},"end":{"line":132,"column":40}},"60":{"start":{"line":132,"column":33},"end":{"line":132,"column":40}},"61":{"start":{"line":133,"column":12},"end":{"line":133,"column":55}},"62":{"start":{"line":133,"column":48},"end":{"line":133,"column":55}},"63":{"start":{"line":134,"column":12},"end":{"line":134,"column":32}},"64":{"start":{"line":137,"column":10},"end":{"line":139,"column":13}},"65":{"start":{"line":138,"column":12},"end":{"line":138,"column":39}},"66":{"start":{"line":141,"column":10},"end":{"line":150,"column":11}},"67":{"start":{"line":142,"column":12},"end":{"line":142,"column":40}},"68":{"start":{"line":142,"column":33},"end":{"line":142,"column":40}},"69":{"start":{"line":143,"column":12},"end":{"line":143,"column":55}},"70":{"start":{"line":143,"column":48},"end":{"line":143,"column":55}},"71":{"start":{"line":144,"column":12},"end":{"line":144,"column":52}},"72":{"start":{"line":145,"column":12},"end":{"line":145,"column":36}},"73":{"start":{"line":145,"column":29},"end":{"line":145,"column":36}},"74":{"start":{"line":149,"column":12},"end":{"line":149,"column":35}},"75":{"start":{"line":152,"column":10},"end":{"line":182,"column":11}},"76":{"start":{"line":154,"column":12},"end":{"line":158,"column":13}},"77":{"start":{"line":155,"column":14},"end":{"line":157,"column":28}},"78":{"start":{"line":156,"column":16},"end":{"line":156,"column":34}},"79":{"start":{"line":159,"column":12},"end":{"line":159,"column":70}},"80":{"start":{"line":159,"column":63},"end":{"line":159,"column":70}},"81":{"start":{"line":160,"column":12},"end":{"line":160,"column":115}},"82":{"start":{"line":161,"column":12},"end":{"line":161,"column":48}},"83":{"start":{"line":162,"column":12},"end":{"line":162,"column":58}},"84":{"start":{"line":163,"column":12},"end":{"line":165,"column":66}},"85":{"start":{"line":167,"column":12},"end":{"line":167,"column":91}},"86":{"start":{"line":170,"column":12},"end":{"line":170,"column":39}},"87":{"start":{"line":172,"column":12},"end":{"line":176,"column":15}},"88":{"start":{"line":177,"column":12},"end":{"line":177,"column":47}},"89":{"start":{"line":180,"column":12},"end":{"line":180,"column":111}},"90":{"start":{"line":181,"column":12},"end":{"line":181,"column":114}},"91":{"start":{"line":187,"column":4},"end":{"line":195,"column":5}},"92":{"start":{"line":188,"column":6},"end":{"line":193,"column":7}},"93":{"start":{"line":189,"column":8},"end":{"line":192,"column":78}},"94":{"start":{"line":191,"column":10},"end":{"line":191,"column":57}},"95":{"start":{"line":194,"column":6},"end":{"line":194,"column":19}},"96":{"start":{"line":197,"column":4},"end":{"line":199,"column":5}},"97":{"start":{"line":198,"column":6},"end":{"line":198,"column":25}},"98":{"start":{"line":201,"column":4},"end":{"line":213,"column":5}},"99":{"start":{"line":202,"column":6},"end":{"line":202,"column":27}},"100":{"start":{"line":203,"column":6},"end":{"line":212,"column":8}},"101":{"start":{"line":204,"column":8},"end":{"line":204,"column":73}},"102":{"start":{"line":205,"column":8},"end":{"line":211,"column":9}},"103":{"start":{"line":206,"column":10},"end":{"line":206,"column":54}},"104":{"start":{"line":207,"column":10},"end":{"line":210,"column":11}},"105":{"start":{"line":208,"column":12},"end":{"line":208,"column":37}},"106":{"start":{"line":209,"column":12},"end":{"line":209,"column":45}},"107":{"start":{"line":215,"column":4},"end":{"line":228,"column":5}},"108":{"start":{"line":216,"column":6},"end":{"line":219,"column":8}},"109":{"start":{"line":220,"column":6},"end":{"line":220,"column":67}},"110":{"start":{"line":221,"column":6},"end":{"line":223,"column":7}},"111":{"start":{"line":222,"column":8},"end":{"line":222,"column":43}},"112":{"start":{"line":226,"column":6},"end":{"line":226,"column":54}},"113":{"start":{"line":226,"column":27},"end":{"line":226,"column":54}},"114":{"start":{"line":227,"column":6},"end":{"line":227,"column":38}},"115":{"start":{"line":230,"column":4},"end":{"line":234,"column":5}},"116":{"start":{"line":231,"column":6},"end":{"line":231,"column":68}},"117":{"start":{"line":231,"column":55},"end":{"line":231,"column":68}},"118":{"start":{"line":232,"column":6},"end":{"line":232,"column":100}},"119":{"start":{"line":232,"column":57},"end":{"line":232,"column":100}},"120":{"start":{"line":233,"column":6},"end":{"line":233,"column":30}},"121":{"start":{"line":236,"column":4},"end":{"line":239,"column":5}},"122":{"start":{"line":237,"column":6},"end":{"line":237,"column":85}},"123":{"start":{"line":238,"column":6},"end":{"line":238,"column":29}},"124":{"start":{"line":241,"column":4},"end":{"line":250,"column":5}},"125":{"start":{"line":242,"column":6},"end":{"line":249,"column":8}},"126":{"start":{"line":252,"column":4},"end":{"line":254,"column":5}},"127":{"start":{"line":253,"column":6},"end":{"line":253,"column":63}},"128":{"start":{"line":256,"column":4},"end":{"line":263,"column":5}},"129":{"start":{"line":257,"column":6},"end":{"line":262,"column":7}},"130":{"start":{"line":259,"column":8},"end":{"line":259,"column":46}},"131":{"start":{"line":261,"column":8},"end":{"line":261,"column":61}},"132":{"start":{"line":266,"column":4},"end":{"line":273,"column":5}},"133":{"start":{"line":267,"column":6},"end":{"line":270,"column":25}},"134":{"start":{"line":272,"column":6},"end":{"line":272,"column":23}},"135":{"start":{"line":275,"column":4},"end":{"line":289,"column":5}},"136":{"start":{"line":276,"column":6},"end":{"line":288,"column":8}},"137":{"start":{"line":279,"column":10},"end":{"line":282,"column":13}},"138":{"start":{"line":283,"column":10},"end":{"line":285,"column":11}},"139":{"start":{"line":284,"column":12},"end":{"line":284,"column":39}},"140":{"start":{"line":286,"column":10},"end":{"line":286,"column":25}},"141":{"start":{"line":291,"column":4},"end":{"line":304,"column":5}},"142":{"start":{"line":292,"column":6},"end":{"line":303,"column":8}},"143":{"start":{"line":297,"column":12},"end":{"line":297,"column":46}},"144":{"start":{"line":300,"column":12},"end":{"line":300,"column":41}},"145":{"start":{"line":306,"column":4},"end":{"line":317,"column":5}},"146":{"start":{"line":307,"column":6},"end":{"line":313,"column":7}},"147":{"start":{"line":308,"column":8},"end":{"line":310,"column":11}},"148":{"start":{"line":309,"column":10},"end":{"line":309,"column":35}},"149":{"start":{"line":312,"column":8},"end":{"line":312,"column":45}},"150":{"start":{"line":315,"column":6},"end":{"line":315,"column":21}},"151":{"start":{"line":316,"column":6},"end":{"line":316,"column":41}},"152":{"start":{"line":319,"column":4},"end":{"line":323,"column":5}},"153":{"start":{"line":320,"column":6},"end":{"line":322,"column":67}},"154":{"start":{"line":325,"column":4},"end":{"line":328,"column":5}},"155":{"start":{"line":326,"column":6},"end":{"line":326,"column":108}},"156":{"start":{"line":327,"column":6},"end":{"line":327,"column":32}},"157":{"start":{"line":330,"column":4},"end":{"line":334,"column":5}},"158":{"start":{"line":331,"column":6},"end":{"line":331,"column":25}},"159":{"start":{"line":331,"column":18},"end":{"line":331,"column":25}},"160":{"start":{"line":332,"column":6},"end":{"line":332,"column":22}},"161":{"start":{"line":333,"column":6},"end":{"line":333,"column":42}}},"branchMap":{"1":{"line":3,"type":"if","locations":[{"start":{"line":3,"column":2},"end":{"line":3,"column":2}},{"start":{"line":3,"column":2},"end":{"line":3,"column":2}}]},"2":{"line":6,"type":"cond-expr","locations":[{"start":{"line":6,"column":39},"end":{"line":6,"column":46}},{"start":{"line":6,"column":49},"end":{"line":6,"column":67}}]},"3":{"line":7,"type":"cond-expr","locations":[{"start":{"line":7,"column":37},"end":{"line":7,"column":42}},{"start":{"line":7,"column":45},"end":{"line":7,"column":64}}]},"4":{"line":8,"type":"if","locations":[{"start":{"line":8,"column":10},"end":{"line":8,"column":10}},{"start":{"line":8,"column":10},"end":{"line":8,"column":10}}]},"5":{"line":8,"type":"binary-expr","locations":[{"start":{"line":8,"column":14},"end":{"line":8,"column":42}},{"start":{"line":8,"column":46},"end":{"line":8,"column":56}}]},"6":{"line":13,"type":"if","locations":[{"start":{"line":13,"column":4},"end":{"line":13,"column":4}},{"start":{"line":13,"column":4},"end":{"line":13,"column":4}}]},"7":{"line":13,"type":"binary-expr","locations":[{"start":{"line":13,"column":8},"end":{"line":13,"column":38}},{"start":{"line":13,"column":42},"end":{"line":13,"column":70}}]},"8":{"line":34,"type":"binary-expr","locations":[{"start":{"line":34,"column":22},"end":{"line":34,"column":67}},{"start":{"line":35,"column":4},"end":{"line":35,"column":38}},{"start":{"line":36,"column":4},"end":{"line":36,"column":63}}]},"9":{"line":38,"type":"if","locations":[{"start":{"line":38,"column":2},"end":{"line":38,"column":2}},{"start":{"line":38,"column":2},"end":{"line":38,"column":2}}]},"10":{"line":65,"type":"binary-expr","locations":[{"start":{"line":65,"column":26},"end":{"line":65,"column":30}},{"start":{"line":65,"column":34},"end":{"line":65,"column":47}},{"start":{"line":65,"column":51},"end":{"line":65,"column":53}}]},"11":{"line":75,"type":"if","locations":[{"start":{"line":75,"column":6},"end":{"line":75,"column":6}},{"start":{"line":75,"column":6},"end":{"line":75,"column":6}}]},"12":{"line":81,"type":"binary-expr","locations":[{"start":{"line":81,"column":37},"end":{"line":81,"column":50}},{"start":{"line":81,"column":54},"end":{"line":81,"column":56}}]},"13":{"line":108,"type":"if","locations":[{"start":{"line":108,"column":10},"end":{"line":108,"column":10}},{"start":{"line":108,"column":10},"end":{"line":108,"column":10}}]},"14":{"line":113,"type":"if","locations":[{"start":{"line":113,"column":12},"end":{"line":113,"column":12}},{"start":{"line":113,"column":12},"end":{"line":113,"column":12}}]},"15":{"line":113,"type":"binary-expr","locations":[{"start":{"line":113,"column":16},"end":{"line":113,"column":24}},{"start":{"line":113,"column":28},"end":{"line":113,"column":43}},{"start":{"line":113,"column":48},"end":{"line":113,"column":72}},{"start":{"line":113,"column":76},"end":{"line":113,"column":94}}]},"16":{"line":117,"type":"binary-expr","locations":[{"start":{"line":117,"column":28},"end":{"line":117,"column":32}},{"start":{"line":117,"column":36},"end":{"line":117,"column":51}}]},"17":{"line":118,"type":"if","locations":[{"start":{"line":118,"column":12},"end":{"line":118,"column":12}},{"start":{"line":118,"column":12},"end":{"line":118,"column":12}}]},"18":{"line":120,"type":"if","locations":[{"start":{"line":120,"column":12},"end":{"line":120,"column":12}},{"start":{"line":120,"column":12},"end":{"line":120,"column":12}}]},"19":{"line":120,"type":"binary-expr","locations":[{"start":{"line":120,"column":16},"end":{"line":120,"column":21}},{"start":{"line":120,"column":25},"end":{"line":120,"column":55}}]},"20":{"line":132,"type":"if","locations":[{"start":{"line":132,"column":12},"end":{"line":132,"column":12}},{"start":{"line":132,"column":12},"end":{"line":132,"column":12}}]},"21":{"line":133,"type":"if","locations":[{"start":{"line":133,"column":12},"end":{"line":133,"column":12}},{"start":{"line":133,"column":12},"end":{"line":133,"column":12}}]},"22":{"line":142,"type":"if","locations":[{"start":{"line":142,"column":12},"end":{"line":142,"column":12}},{"start":{"line":142,"column":12},"end":{"line":142,"column":12}}]},"23":{"line":143,"type":"if","locations":[{"start":{"line":143,"column":12},"end":{"line":143,"column":12}},{"start":{"line":143,"column":12},"end":{"line":143,"column":12}}]},"24":{"line":144,"type":"binary-expr","locations":[{"start":{"line":144,"column":28},"end":{"line":144,"column":32}},{"start":{"line":144,"column":36},"end":{"line":144,"column":51}}]},"25":{"line":145,"type":"if","locations":[{"start":{"line":145,"column":12},"end":{"line":145,"column":12}},{"start":{"line":145,"column":12},"end":{"line":145,"column":12}}]},"26":{"line":154,"type":"if","locations":[{"start":{"line":154,"column":12},"end":{"line":154,"column":12}},{"start":{"line":154,"column":12},"end":{"line":154,"column":12}}]},"27":{"line":154,"type":"binary-expr","locations":[{"start":{"line":154,"column":16},"end":{"line":154,"column":41}},{"start":{"line":154,"column":45},"end":{"line":154,"column":71}}]},"28":{"line":159,"type":"if","locations":[{"start":{"line":159,"column":12},"end":{"line":159,"column":12}},{"start":{"line":159,"column":12},"end":{"line":159,"column":12}}]},"29":{"line":159,"type":"binary-expr","locations":[{"start":{"line":159,"column":16},"end":{"line":159,"column":33}},{"start":{"line":159,"column":37},"end":{"line":159,"column":61}}]},"30":{"line":160,"type":"cond-expr","locations":[{"start":{"line":160,"column":78},"end":{"line":160,"column":97}},{"start":{"line":160,"column":100},"end":{"line":160,"column":114}}]},"31":{"line":163,"type":"cond-expr","locations":[{"start":{"line":164,"column":14},"end":{"line":164,"column":112}},{"start":{"line":165,"column":14},"end":{"line":165,"column":65}}]},"32":{"line":164,"type":"binary-expr","locations":[{"start":{"line":164,"column":62},"end":{"line":164,"column":79}},{"start":{"line":164,"column":83},"end":{"line":164,"column":85}}]},"33":{"line":180,"type":"cond-expr","locations":[{"start":{"line":180,"column":45},"end":{"line":180,"column":95}},{"start":{"line":180,"column":98},"end":{"line":180,"column":110}}]},"34":{"line":181,"type":"cond-expr","locations":[{"start":{"line":181,"column":49},"end":{"line":181,"column":98}},{"start":{"line":181,"column":101},"end":{"line":181,"column":113}}]},"35":{"line":188,"type":"if","locations":[{"start":{"line":188,"column":6},"end":{"line":188,"column":6}},{"start":{"line":188,"column":6},"end":{"line":188,"column":6}}]},"36":{"line":188,"type":"binary-expr","locations":[{"start":{"line":188,"column":10},"end":{"line":188,"column":16}},{"start":{"line":188,"column":20},"end":{"line":188,"column":26}},{"start":{"line":188,"column":30},"end":{"line":188,"column":43}},{"start":{"line":188,"column":47},"end":{"line":188,"column":60}}]},"37":{"line":189,"type":"cond-expr","locations":[{"start":{"line":190,"column":8},"end":{"line":191,"column":60}},{"start":{"line":192,"column":10},"end":{"line":192,"column":77}}]},"38":{"line":190,"type":"binary-expr","locations":[{"start":{"line":190,"column":8},"end":{"line":190,"column":39}},{"start":{"line":190,"column":43},"end":{"line":191,"column":60}}]},"39":{"line":192,"type":"cond-expr","locations":[{"start":{"line":192,"column":38},"end":{"line":192,"column":69}},{"start":{"line":192,"column":72},"end":{"line":192,"column":77}}]},"40":{"line":204,"type":"binary-expr","locations":[{"start":{"line":204,"column":22},"end":{"line":204,"column":46}},{"start":{"line":204,"column":50},"end":{"line":204,"column":72}}]},"41":{"line":205,"type":"if","locations":[{"start":{"line":205,"column":8},"end":{"line":205,"column":8}},{"start":{"line":205,"column":8},"end":{"line":205,"column":8}}]},"42":{"line":207,"type":"if","locations":[{"start":{"line":207,"column":10},"end":{"line":207,"column":10}},{"start":{"line":207,"column":10},"end":{"line":207,"column":10}}]},"43":{"line":207,"type":"binary-expr","locations":[{"start":{"line":207,"column":14},"end":{"line":207,"column":43}},{"start":{"line":207,"column":47},"end":{"line":207,"column":96}}]},"44":{"line":216,"type":"binary-expr","locations":[{"start":{"line":216,"column":32},"end":{"line":216,"column":49}},{"start":{"line":217,"column":8},"end":{"line":217,"column":44}},{"start":{"line":218,"column":8},"end":{"line":218,"column":36}}]},"45":{"line":226,"type":"if","locations":[{"start":{"line":226,"column":6},"end":{"line":226,"column":6}},{"start":{"line":226,"column":6},"end":{"line":226,"column":6}}]},"46":{"line":231,"type":"if","locations":[{"start":{"line":231,"column":6},"end":{"line":231,"column":6}},{"start":{"line":231,"column":6},"end":{"line":231,"column":6}}]},"47":{"line":231,"type":"binary-expr","locations":[{"start":{"line":231,"column":10},"end":{"line":231,"column":35}},{"start":{"line":231,"column":39},"end":{"line":231,"column":53}}]},"48":{"line":232,"type":"if","locations":[{"start":{"line":232,"column":6},"end":{"line":232,"column":6}},{"start":{"line":232,"column":6},"end":{"line":232,"column":6}}]},"49":{"line":232,"type":"binary-expr","locations":[{"start":{"line":232,"column":10},"end":{"line":232,"column":35}},{"start":{"line":232,"column":39},"end":{"line":232,"column":55}}]},"50":{"line":257,"type":"if","locations":[{"start":{"line":257,"column":6},"end":{"line":257,"column":6}},{"start":{"line":257,"column":6},"end":{"line":257,"column":6}}]},"51":{"line":283,"type":"if","locations":[{"start":{"line":283,"column":10},"end":{"line":283,"column":10}},{"start":{"line":283,"column":10},"end":{"line":283,"column":10}}]},"52":{"line":307,"type":"if","locations":[{"start":{"line":307,"column":6},"end":{"line":307,"column":6}},{"start":{"line":307,"column":6},"end":{"line":307,"column":6}}]},"53":{"line":320,"type":"binary-expr","locations":[{"start":{"line":320,"column":13},"end":{"line":320,"column":20}},{"start":{"line":321,"column":9},"end":{"line":321,"column":29}},{"start":{"line":321,"column":33},"end":{"line":321,"column":47}},{"start":{"line":322,"column":9},"end":{"line":322,"column":34}},{"start":{"line":322,"column":38},"end":{"line":322,"column":65}}]},"54":{"line":331,"type":"if","locations":[{"start":{"line":331,"column":6},"end":{"line":331,"column":6}},{"start":{"line":331,"column":6},"end":{"line":331,"column":6}}]}}}; } __cov_sIM21KhAGhzWP0B7wdkh_A = __cov_sIM21KhAGhzWP0B7wdkh_A['/src/angular-chart.js']; -__cov_sIM21KhAGhzWP0B7wdkh_A.s['1']++;(function(factory){'use strict';__cov_sIM21KhAGhzWP0B7wdkh_A.f['1']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['2']++;if(typeof exports==='object'){__cov_sIM21KhAGhzWP0B7wdkh_A.b['1'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['3']++;module.exports=factory(typeof angular!=='undefined'?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['2'][0]++,angular):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['2'][1]++,require('angular')),typeof Chart!=='undefined'?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['3'][0]++,Chart):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['3'][1]++,require('chart.js')));}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['1'][1]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['4']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['5'][0]++,typeof define==='function')&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['5'][1]++,define.amd)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['4'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['5']++;define(['angular','chart'],factory);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['4'][1]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['6']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['7'][0]++,typeof angular==='undefined')||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['7'][1]++,typeof Chart==='undefined')){__cov_sIM21KhAGhzWP0B7wdkh_A.b['6'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['7']++;throw new Error('Chart.js library needs to included, '+'see http://jtblin.github.io/angular-chart.js/');}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['6'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['8']++;factory(angular,Chart);}}}(function(angular,Chart){'use strict';__cov_sIM21KhAGhzWP0B7wdkh_A.f['2']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['9']++;Chart.defaults.global.multiTooltipTemplate='<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>';__cov_sIM21KhAGhzWP0B7wdkh_A.s['10']++;Chart.defaults.global.elements.line.borderWidth=2;__cov_sIM21KhAGhzWP0B7wdkh_A.s['11']++;Chart.defaults.global.elements.rectangle.borderWidth=2;__cov_sIM21KhAGhzWP0B7wdkh_A.s['12']++;Chart.defaults.global.legend.display=false;__cov_sIM21KhAGhzWP0B7wdkh_A.s['13']++;Chart.defaults.global.colors=['#97BBCD','#DCDCDC','#F7464A','#46BFBD','#FDB45C','#949FB1','#4D5360'];__cov_sIM21KhAGhzWP0B7wdkh_A.s['14']++;var usingExcanvas=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['8'][0]++,typeof window.G_vmlCanvasManager==='object')&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['8'][1]++,window.G_vmlCanvasManager!==null)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['8'][2]++,typeof window.G_vmlCanvasManager.initElement==='function');__cov_sIM21KhAGhzWP0B7wdkh_A.s['15']++;if(usingExcanvas){__cov_sIM21KhAGhzWP0B7wdkh_A.b['9'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['16']++;Chart.defaults.global.animation=false;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['9'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['17']++;return angular.module('chart.js',[]).provider('ChartJs',ChartJsProvider).factory('ChartJsFactory',['ChartJs','$timeout',ChartJsFactory]).directive('chartBase',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['3']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['18']++;return new ChartJsFactory();}]).directive('chartLine',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['4']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['19']++;return new ChartJsFactory('line');}]).directive('chartBar',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['5']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['20']++;return new ChartJsFactory('bar');}]).directive('chartRadar',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['6']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['21']++;return new ChartJsFactory('radar');}]).directive('chartDoughnut',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['7']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['22']++;return new ChartJsFactory('doughnut');}]).directive('chartPie',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['8']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['23']++;return new ChartJsFactory('pie');}]).directive('chartPolarArea',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['9']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['24']++;return new ChartJsFactory('polarArea');}]);function ChartJsProvider(){__cov_sIM21KhAGhzWP0B7wdkh_A.f['10']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['26']++;var options={};__cov_sIM21KhAGhzWP0B7wdkh_A.s['27']++;var ChartJs={Chart:Chart,getOptions:function(type){__cov_sIM21KhAGhzWP0B7wdkh_A.f['11']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['28']++;var typeOptions=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['10'][0]++,type)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['10'][1]++,options[type])||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['10'][2]++,{});__cov_sIM21KhAGhzWP0B7wdkh_A.s['29']++;return angular.extend({},options,typeOptions);}};__cov_sIM21KhAGhzWP0B7wdkh_A.s['30']++;this.setOptions=function(type,customOptions){__cov_sIM21KhAGhzWP0B7wdkh_A.f['12']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['31']++;if(!customOptions){__cov_sIM21KhAGhzWP0B7wdkh_A.b['11'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['32']++;customOptions=type;__cov_sIM21KhAGhzWP0B7wdkh_A.s['33']++;options=angular.extend(options,customOptions);__cov_sIM21KhAGhzWP0B7wdkh_A.s['34']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['11'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['35']++;options[type]=angular.extend((__cov_sIM21KhAGhzWP0B7wdkh_A.b['12'][0]++,options[type])||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['12'][1]++,{}),customOptions);};__cov_sIM21KhAGhzWP0B7wdkh_A.s['36']++;this.$get=function(){__cov_sIM21KhAGhzWP0B7wdkh_A.f['13']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['37']++;return ChartJs;};}function ChartJsFactory(ChartJs,$timeout){__cov_sIM21KhAGhzWP0B7wdkh_A.f['14']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['39']++;return function chart(type){__cov_sIM21KhAGhzWP0B7wdkh_A.f['15']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['40']++;return{restrict:'CA',scope:{chartGetColor:'=?',chartType:'=',chartData:'=?',chartLabels:'=?',chartOptions:'=?',chartSeries:'=?',chartColors:'=?',chartClick:'=?',chartHover:'=?',chartYAxes:'=?'},link:function(scope,elem){__cov_sIM21KhAGhzWP0B7wdkh_A.f['16']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['41']++;var chart;__cov_sIM21KhAGhzWP0B7wdkh_A.s['42']++;if(usingExcanvas){__cov_sIM21KhAGhzWP0B7wdkh_A.b['13'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['43']++;window.G_vmlCanvasManager.initElement(elem[0]);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['13'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['44']++;scope.$watch('chartData',function(newVal,oldVal){__cov_sIM21KhAGhzWP0B7wdkh_A.f['17']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['45']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['15'][0]++,!newVal)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['15'][1]++,!newVal.length)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['15'][2]++,Array.isArray(newVal[0]))&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['15'][3]++,!newVal[0].length)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['14'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['46']++;destroyChart(chart,scope);__cov_sIM21KhAGhzWP0B7wdkh_A.s['47']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['14'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['48']++;var chartType=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['16'][0]++,type)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['16'][1]++,scope.chartType);__cov_sIM21KhAGhzWP0B7wdkh_A.s['49']++;if(!chartType){__cov_sIM21KhAGhzWP0B7wdkh_A.b['17'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['50']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['17'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['51']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['19'][0]++,chart)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['19'][1]++,canUpdateChart(newVal,oldVal))){__cov_sIM21KhAGhzWP0B7wdkh_A.b['18'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['52']++;return updateChart(chart,newVal,scope);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['18'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['53']++;createChart(chartType);},true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['54']++;scope.$watch('chartSeries',resetChart,true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['55']++;scope.$watch('chartLabels',resetChart,true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['56']++;scope.$watch('chartOptions',resetChart,true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['57']++;scope.$watch('chartColors',resetChart,true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['58']++;scope.$watch('chartType',function(newVal,oldVal){__cov_sIM21KhAGhzWP0B7wdkh_A.f['18']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['59']++;if(isEmpty(newVal)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['20'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['60']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['20'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['61']++;if(angular.equals(newVal,oldVal)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['21'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['62']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['21'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['63']++;createChart(newVal);});__cov_sIM21KhAGhzWP0B7wdkh_A.s['64']++;scope.$on('$destroy',function(){__cov_sIM21KhAGhzWP0B7wdkh_A.f['19']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['65']++;destroyChart(chart,scope);});function resetChart(newVal,oldVal){__cov_sIM21KhAGhzWP0B7wdkh_A.f['20']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['67']++;if(isEmpty(newVal)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['22'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['68']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['22'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['69']++;if(angular.equals(newVal,oldVal)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['23'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['70']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['23'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['71']++;var chartType=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['24'][0]++,type)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['24'][1]++,scope.chartType);__cov_sIM21KhAGhzWP0B7wdkh_A.s['72']++;if(!chartType){__cov_sIM21KhAGhzWP0B7wdkh_A.b['25'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['73']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['25'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['74']++;createChart(chartType);}function createChart(type){__cov_sIM21KhAGhzWP0B7wdkh_A.f['21']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['76']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['27'][0]++,isResponsive(type,scope))&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['27'][1]++,elem[0].clientHeight===0)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['26'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['77']++;return $timeout(function(){__cov_sIM21KhAGhzWP0B7wdkh_A.f['22']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['78']++;createChart(type);},50,false);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['26'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['79']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['29'][0]++,!scope.chartData)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['29'][1]++,!scope.chartData.length)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['28'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['80']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['28'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['81']++;scope.chartGetColor=typeof scope.chartGetColor==='function'?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['30'][0]++,scope.chartGetColor):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['30'][1]++,getRandomColor);__cov_sIM21KhAGhzWP0B7wdkh_A.s['82']++;var colors=getColors(type,scope);__cov_sIM21KhAGhzWP0B7wdkh_A.s['83']++;var cvs=elem[0],ctx=cvs.getContext('2d');__cov_sIM21KhAGhzWP0B7wdkh_A.s['84']++;var data=Array.isArray(scope.chartData[0])?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['31'][0]++,getDataSets(scope.chartLabels,scope.chartData,(__cov_sIM21KhAGhzWP0B7wdkh_A.b['32'][0]++,scope.chartSeries)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['32'][1]++,[]),colors,scope.chartYAxes)):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['31'][1]++,getData(scope.chartLabels,scope.chartData,colors));__cov_sIM21KhAGhzWP0B7wdkh_A.s['85']++;var options=angular.extend({},ChartJs.getOptions(type),scope.chartOptions);__cov_sIM21KhAGhzWP0B7wdkh_A.s['86']++;destroyChart(chart,scope);__cov_sIM21KhAGhzWP0B7wdkh_A.s['87']++;chart=new ChartJs.Chart(ctx,{type:type,data:data,options:options});__cov_sIM21KhAGhzWP0B7wdkh_A.s['88']++;scope.$emit('chart-create',chart);__cov_sIM21KhAGhzWP0B7wdkh_A.s['89']++;cvs.onclick=scope.chartClick?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['33'][0]++,getEventHandler(scope,chart,'chartClick',false)):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['33'][1]++,angular.noop);__cov_sIM21KhAGhzWP0B7wdkh_A.s['90']++;cvs.onmousemove=scope.chartHover?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['34'][0]++,getEventHandler(scope,chart,'chartHover',true)):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['34'][1]++,angular.noop);}}};};function canUpdateChart(newVal,oldVal){__cov_sIM21KhAGhzWP0B7wdkh_A.f['23']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['92']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['36'][0]++,newVal)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['36'][1]++,oldVal)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['36'][2]++,newVal.length)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['36'][3]++,oldVal.length)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['35'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['93']++;return Array.isArray(newVal[0])?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['37'][0]++,(__cov_sIM21KhAGhzWP0B7wdkh_A.b['38'][0]++,newVal.length===oldVal.length)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['38'][1]++,newVal.every(function(element,index){__cov_sIM21KhAGhzWP0B7wdkh_A.f['24']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['94']++;return element.length===oldVal[index].length;}))):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['37'][1]++,oldVal.reduce(sum,0)>0?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['39'][0]++,newVal.length===oldVal.length):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['39'][1]++,false));}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['35'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['95']++;return false;}function sum(carry,val){__cov_sIM21KhAGhzWP0B7wdkh_A.f['25']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['97']++;return carry+val;}function getEventHandler(scope,chart,action,triggerOnlyOnChange){__cov_sIM21KhAGhzWP0B7wdkh_A.f['26']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['99']++;var lastState=null;__cov_sIM21KhAGhzWP0B7wdkh_A.s['100']++;return function(evt){__cov_sIM21KhAGhzWP0B7wdkh_A.f['27']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['101']++;var atEvent=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['40'][0]++,chart.getElementsAtEvent)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['40'][1]++,chart.getPointsAtEvent);__cov_sIM21KhAGhzWP0B7wdkh_A.s['102']++;if(atEvent){__cov_sIM21KhAGhzWP0B7wdkh_A.b['41'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['103']++;var activePoints=atEvent.call(chart,evt);__cov_sIM21KhAGhzWP0B7wdkh_A.s['104']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['43'][0]++,triggerOnlyOnChange===false)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['43'][1]++,angular.equals(lastState,activePoints)===false)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['42'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['105']++;lastState=activePoints;__cov_sIM21KhAGhzWP0B7wdkh_A.s['106']++;scope[action](activePoints,evt);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['42'][1]++;}}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['41'][1]++;}};}function getColors(type,scope){__cov_sIM21KhAGhzWP0B7wdkh_A.f['28']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['108']++;var colors=angular.copy((__cov_sIM21KhAGhzWP0B7wdkh_A.b['44'][0]++,scope.chartColors)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['44'][1]++,ChartJs.getOptions(type).chartColors)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['44'][2]++,Chart.defaults.global.colors));__cov_sIM21KhAGhzWP0B7wdkh_A.s['109']++;var notEnoughColors=colors.length>16&255,g=bigint>>8&255,b=bigint&255;__cov_sIM21KhAGhzWP0B7wdkh_A.s['134']++;return[r,g,b];}function getDataSets(labels,data,series,colors,yaxis){__cov_sIM21KhAGhzWP0B7wdkh_A.f['35']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['136']++;return{labels:labels,datasets:data.map(function(item,i){__cov_sIM21KhAGhzWP0B7wdkh_A.f['36']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['137']++;var dataset=angular.extend({},colors[i],{label:series[i],data:item});__cov_sIM21KhAGhzWP0B7wdkh_A.s['138']++;if(yaxis){__cov_sIM21KhAGhzWP0B7wdkh_A.b['51'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['139']++;dataset.yAxisID='y-axis-'+(i+1);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['51'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['140']++;return dataset;})};}function getData(labels,data,colors){__cov_sIM21KhAGhzWP0B7wdkh_A.f['37']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['142']++;return{labels:labels,datasets:[{data:data,backgroundColor:colors.map(function(color){__cov_sIM21KhAGhzWP0B7wdkh_A.f['38']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['143']++;return color.pointBackgroundColor;}),hoverBackgroundColor:colors.map(function(color){__cov_sIM21KhAGhzWP0B7wdkh_A.f['39']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['144']++;return color.backgroundColor;})}]};}function updateChart(chart,values,scope){__cov_sIM21KhAGhzWP0B7wdkh_A.f['40']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['146']++;if(Array.isArray(scope.chartData[0])){__cov_sIM21KhAGhzWP0B7wdkh_A.b['52'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['147']++;chart.data.datasets.forEach(function(dataset,i){__cov_sIM21KhAGhzWP0B7wdkh_A.f['41']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['148']++;dataset.data=values[i];});}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['52'][1]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['149']++;chart.data.datasets[0].data=values;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['150']++;chart.update();__cov_sIM21KhAGhzWP0B7wdkh_A.s['151']++;scope.$emit('chart-update',chart);}function isEmpty(value){__cov_sIM21KhAGhzWP0B7wdkh_A.f['42']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['153']++;return(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][0]++,!value)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][1]++,Array.isArray(value))&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][2]++,!value.length)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][3]++,typeof value==='object')&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][4]++,!Object.keys(value).length);}function isResponsive(type,scope){__cov_sIM21KhAGhzWP0B7wdkh_A.f['43']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['155']++;var options=angular.extend({},Chart.defaults.global,ChartJs.getOptions(type),scope.chartOptions);__cov_sIM21KhAGhzWP0B7wdkh_A.s['156']++;return options.responsive;}function destroyChart(chart,scope){__cov_sIM21KhAGhzWP0B7wdkh_A.f['44']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['158']++;if(!chart){__cov_sIM21KhAGhzWP0B7wdkh_A.b['54'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['159']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['54'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['160']++;chart.destroy();__cov_sIM21KhAGhzWP0B7wdkh_A.s['161']++;scope.$emit('chart-destroy',chart);}}})); +__cov_sIM21KhAGhzWP0B7wdkh_A.s['1']++;(function(factory){'use strict';__cov_sIM21KhAGhzWP0B7wdkh_A.f['1']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['2']++;if(typeof exports==='object'){__cov_sIM21KhAGhzWP0B7wdkh_A.b['1'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['3']++;module.exports=factory(typeof angular!=='undefined'?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['2'][0]++,angular):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['2'][1]++,require('angular')),typeof Chart!=='undefined'?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['3'][0]++,Chart):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['3'][1]++,require('chart.js')));}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['1'][1]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['4']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['5'][0]++,typeof define==='function')&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['5'][1]++,define.amd)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['4'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['5']++;define(['angular','chart'],factory);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['4'][1]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['6']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['7'][0]++,typeof angular==='undefined')||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['7'][1]++,typeof Chart==='undefined')){__cov_sIM21KhAGhzWP0B7wdkh_A.b['6'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['7']++;throw new Error('Chart.js library needs to included, '+'see http://jtblin.github.io/angular-chart.js/');}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['6'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['8']++;factory(angular,Chart);}}}(function(angular,Chart){'use strict';__cov_sIM21KhAGhzWP0B7wdkh_A.f['2']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['9']++;Chart.defaults.global.multiTooltipTemplate='<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>';__cov_sIM21KhAGhzWP0B7wdkh_A.s['10']++;Chart.defaults.global.elements.line.borderWidth=2;__cov_sIM21KhAGhzWP0B7wdkh_A.s['11']++;Chart.defaults.global.elements.rectangle.borderWidth=2;__cov_sIM21KhAGhzWP0B7wdkh_A.s['12']++;Chart.defaults.global.legend.display=false;__cov_sIM21KhAGhzWP0B7wdkh_A.s['13']++;Chart.defaults.global.colors=['#97BBCD','#DCDCDC','#F7464A','#46BFBD','#FDB45C','#949FB1','#4D5360'];__cov_sIM21KhAGhzWP0B7wdkh_A.s['14']++;var usingExcanvas=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['8'][0]++,typeof window.G_vmlCanvasManager==='object')&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['8'][1]++,window.G_vmlCanvasManager!==null)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['8'][2]++,typeof window.G_vmlCanvasManager.initElement==='function');__cov_sIM21KhAGhzWP0B7wdkh_A.s['15']++;if(usingExcanvas){__cov_sIM21KhAGhzWP0B7wdkh_A.b['9'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['16']++;Chart.defaults.global.animation=false;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['9'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['17']++;return angular.module('chart.js',[]).provider('ChartJs',ChartJsProvider).factory('ChartJsFactory',['ChartJs','$timeout',ChartJsFactory]).directive('chartBase',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['3']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['18']++;return new ChartJsFactory();}]).directive('chartLine',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['4']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['19']++;return new ChartJsFactory('line');}]).directive('chartBar',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['5']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['20']++;return new ChartJsFactory('bar');}]).directive('chartRadar',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['6']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['21']++;return new ChartJsFactory('radar');}]).directive('chartDoughnut',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['7']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['22']++;return new ChartJsFactory('doughnut');}]).directive('chartPie',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['8']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['23']++;return new ChartJsFactory('pie');}]).directive('chartPolarArea',['ChartJsFactory',function(ChartJsFactory){__cov_sIM21KhAGhzWP0B7wdkh_A.f['9']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['24']++;return new ChartJsFactory('polarArea');}]);function ChartJsProvider(){__cov_sIM21KhAGhzWP0B7wdkh_A.f['10']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['26']++;var options={};__cov_sIM21KhAGhzWP0B7wdkh_A.s['27']++;var ChartJs={Chart:Chart,getOptions:function(type){__cov_sIM21KhAGhzWP0B7wdkh_A.f['11']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['28']++;var typeOptions=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['10'][0]++,type)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['10'][1]++,options[type])||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['10'][2]++,{});__cov_sIM21KhAGhzWP0B7wdkh_A.s['29']++;return angular.extend({},options,typeOptions);}};__cov_sIM21KhAGhzWP0B7wdkh_A.s['30']++;this.setOptions=function(type,customOptions){__cov_sIM21KhAGhzWP0B7wdkh_A.f['12']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['31']++;if(!customOptions){__cov_sIM21KhAGhzWP0B7wdkh_A.b['11'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['32']++;customOptions=type;__cov_sIM21KhAGhzWP0B7wdkh_A.s['33']++;options=angular.extend(options,customOptions);__cov_sIM21KhAGhzWP0B7wdkh_A.s['34']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['11'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['35']++;options[type]=angular.extend((__cov_sIM21KhAGhzWP0B7wdkh_A.b['12'][0]++,options[type])||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['12'][1]++,{}),customOptions);};__cov_sIM21KhAGhzWP0B7wdkh_A.s['36']++;this.$get=function(){__cov_sIM21KhAGhzWP0B7wdkh_A.f['13']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['37']++;return ChartJs;};}function ChartJsFactory(ChartJs,$timeout){__cov_sIM21KhAGhzWP0B7wdkh_A.f['14']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['39']++;return function chart(type){__cov_sIM21KhAGhzWP0B7wdkh_A.f['15']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['40']++;return{restrict:'CA',scope:{chartGetColor:'=?',chartType:'=',chartData:'=?',chartLabels:'=?',chartOptions:'=?',chartSeries:'=?',chartColors:'=?',chartClick:'=?',chartHover:'=?',chartYAxes:'=?'},link:function(scope,elem){__cov_sIM21KhAGhzWP0B7wdkh_A.f['16']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['41']++;var chart;__cov_sIM21KhAGhzWP0B7wdkh_A.s['42']++;if(usingExcanvas){__cov_sIM21KhAGhzWP0B7wdkh_A.b['13'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['43']++;window.G_vmlCanvasManager.initElement(elem[0]);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['13'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['44']++;scope.$watch('chartData',function(newVal,oldVal){__cov_sIM21KhAGhzWP0B7wdkh_A.f['17']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['45']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['15'][0]++,!newVal)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['15'][1]++,!newVal.length)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['15'][2]++,Array.isArray(newVal[0]))&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['15'][3]++,!newVal[0].length)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['14'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['46']++;destroyChart(chart,scope);__cov_sIM21KhAGhzWP0B7wdkh_A.s['47']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['14'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['48']++;var chartType=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['16'][0]++,type)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['16'][1]++,scope.chartType);__cov_sIM21KhAGhzWP0B7wdkh_A.s['49']++;if(!chartType){__cov_sIM21KhAGhzWP0B7wdkh_A.b['17'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['50']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['17'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['51']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['19'][0]++,chart)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['19'][1]++,canUpdateChart(newVal,oldVal))){__cov_sIM21KhAGhzWP0B7wdkh_A.b['18'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['52']++;return updateChart(chart,newVal,scope);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['18'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['53']++;createChart(chartType);},true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['54']++;scope.$watch('chartSeries',resetChart,true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['55']++;scope.$watch('chartLabels',resetChart,true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['56']++;scope.$watch('chartOptions',resetChart,true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['57']++;scope.$watch('chartColors',resetChart,true);__cov_sIM21KhAGhzWP0B7wdkh_A.s['58']++;scope.$watch('chartType',function(newVal,oldVal){__cov_sIM21KhAGhzWP0B7wdkh_A.f['18']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['59']++;if(isEmpty(newVal)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['20'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['60']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['20'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['61']++;if(angular.equals(newVal,oldVal)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['21'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['62']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['21'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['63']++;createChart(newVal);});__cov_sIM21KhAGhzWP0B7wdkh_A.s['64']++;scope.$on('$destroy',function(){__cov_sIM21KhAGhzWP0B7wdkh_A.f['19']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['65']++;destroyChart(chart,scope);});function resetChart(newVal,oldVal){__cov_sIM21KhAGhzWP0B7wdkh_A.f['20']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['67']++;if(isEmpty(newVal)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['22'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['68']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['22'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['69']++;if(angular.equals(newVal,oldVal)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['23'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['70']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['23'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['71']++;var chartType=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['24'][0]++,type)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['24'][1]++,scope.chartType);__cov_sIM21KhAGhzWP0B7wdkh_A.s['72']++;if(!chartType){__cov_sIM21KhAGhzWP0B7wdkh_A.b['25'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['73']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['25'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['74']++;createChart(chartType);}function createChart(type){__cov_sIM21KhAGhzWP0B7wdkh_A.f['21']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['76']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['27'][0]++,isResponsive(type,scope))&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['27'][1]++,elem[0].clientHeight===0)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['26'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['77']++;return $timeout(function(){__cov_sIM21KhAGhzWP0B7wdkh_A.f['22']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['78']++;createChart(type);},50,false);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['26'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['79']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['29'][0]++,!scope.chartData)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['29'][1]++,!scope.chartData.length)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['28'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['80']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['28'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['81']++;scope.chartGetColor=typeof scope.chartGetColor==='function'?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['30'][0]++,scope.chartGetColor):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['30'][1]++,getRandomColor);__cov_sIM21KhAGhzWP0B7wdkh_A.s['82']++;var colors=getColors(type,scope);__cov_sIM21KhAGhzWP0B7wdkh_A.s['83']++;var cvs=elem[0],ctx=cvs.getContext('2d');__cov_sIM21KhAGhzWP0B7wdkh_A.s['84']++;var data=Array.isArray(scope.chartData[0])?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['31'][0]++,getDataSets(scope.chartLabels,scope.chartData,(__cov_sIM21KhAGhzWP0B7wdkh_A.b['32'][0]++,scope.chartSeries)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['32'][1]++,[]),colors,scope.chartYAxes)):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['31'][1]++,getData(scope.chartLabels,scope.chartData,colors));__cov_sIM21KhAGhzWP0B7wdkh_A.s['85']++;var options=angular.extend({},ChartJs.getOptions(type),scope.chartOptions);__cov_sIM21KhAGhzWP0B7wdkh_A.s['86']++;destroyChart(chart,scope);__cov_sIM21KhAGhzWP0B7wdkh_A.s['87']++;chart=new ChartJs.Chart(ctx,{type:type,data:data,options:options});__cov_sIM21KhAGhzWP0B7wdkh_A.s['88']++;scope.$emit('chart-create',chart);__cov_sIM21KhAGhzWP0B7wdkh_A.s['89']++;cvs.onclick=scope.chartClick?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['33'][0]++,getEventHandler(scope,chart,'chartClick',false)):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['33'][1]++,angular.noop);__cov_sIM21KhAGhzWP0B7wdkh_A.s['90']++;cvs.onmousemove=scope.chartHover?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['34'][0]++,getEventHandler(scope,chart,'chartHover',true)):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['34'][1]++,angular.noop);}}};};function canUpdateChart(newVal,oldVal){__cov_sIM21KhAGhzWP0B7wdkh_A.f['23']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['92']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['36'][0]++,newVal)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['36'][1]++,oldVal)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['36'][2]++,newVal.length)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['36'][3]++,oldVal.length)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['35'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['93']++;return Array.isArray(newVal[0])?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['37'][0]++,(__cov_sIM21KhAGhzWP0B7wdkh_A.b['38'][0]++,newVal.length===oldVal.length)&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['38'][1]++,newVal.every(function(element,index){__cov_sIM21KhAGhzWP0B7wdkh_A.f['24']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['94']++;return element.length===oldVal[index].length;}))):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['37'][1]++,oldVal.reduce(sum,0)>0?(__cov_sIM21KhAGhzWP0B7wdkh_A.b['39'][0]++,newVal.length===oldVal.length):(__cov_sIM21KhAGhzWP0B7wdkh_A.b['39'][1]++,false));}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['35'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['95']++;return false;}function sum(carry,val){__cov_sIM21KhAGhzWP0B7wdkh_A.f['25']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['97']++;return carry+val;}function getEventHandler(scope,chart,action,triggerOnlyOnChange){__cov_sIM21KhAGhzWP0B7wdkh_A.f['26']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['99']++;var lastState=null;__cov_sIM21KhAGhzWP0B7wdkh_A.s['100']++;return function(evt){__cov_sIM21KhAGhzWP0B7wdkh_A.f['27']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['101']++;var atEvent=(__cov_sIM21KhAGhzWP0B7wdkh_A.b['40'][0]++,chart.getElementsAtEvent)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['40'][1]++,chart.getPointsAtEvent);__cov_sIM21KhAGhzWP0B7wdkh_A.s['102']++;if(atEvent){__cov_sIM21KhAGhzWP0B7wdkh_A.b['41'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['103']++;var activePoints=atEvent.call(chart,evt);__cov_sIM21KhAGhzWP0B7wdkh_A.s['104']++;if((__cov_sIM21KhAGhzWP0B7wdkh_A.b['43'][0]++,triggerOnlyOnChange===false)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['43'][1]++,angular.equals(lastState,activePoints)===false)){__cov_sIM21KhAGhzWP0B7wdkh_A.b['42'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['105']++;lastState=activePoints;__cov_sIM21KhAGhzWP0B7wdkh_A.s['106']++;scope[action](activePoints,evt);}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['42'][1]++;}}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['41'][1]++;}};}function getColors(type,scope){__cov_sIM21KhAGhzWP0B7wdkh_A.f['28']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['108']++;var colors=angular.copy((__cov_sIM21KhAGhzWP0B7wdkh_A.b['44'][0]++,scope.chartColors)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['44'][1]++,ChartJs.getOptions(type).chartColors)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['44'][2]++,Chart.defaults.global.colors));__cov_sIM21KhAGhzWP0B7wdkh_A.s['109']++;var notEnoughColors=colors.length>16&255,g=bigint>>8&255,b=bigint&255;__cov_sIM21KhAGhzWP0B7wdkh_A.s['134']++;return[r,g,b];}function getDataSets(labels,data,series,colors,yaxis){__cov_sIM21KhAGhzWP0B7wdkh_A.f['35']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['136']++;return{labels:labels,datasets:data.map(function(item,i){__cov_sIM21KhAGhzWP0B7wdkh_A.f['36']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['137']++;var dataset=angular.extend({},colors[i],{label:series[i],data:item});__cov_sIM21KhAGhzWP0B7wdkh_A.s['138']++;if(yaxis){__cov_sIM21KhAGhzWP0B7wdkh_A.b['51'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['139']++;dataset.yAxisID=yaxis[i];}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['51'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['140']++;return dataset;})};}function getData(labels,data,colors){__cov_sIM21KhAGhzWP0B7wdkh_A.f['37']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['142']++;return{labels:labels,datasets:[{data:data,backgroundColor:colors.map(function(color){__cov_sIM21KhAGhzWP0B7wdkh_A.f['38']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['143']++;return color.pointBackgroundColor;}),hoverBackgroundColor:colors.map(function(color){__cov_sIM21KhAGhzWP0B7wdkh_A.f['39']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['144']++;return color.backgroundColor;})}]};}function updateChart(chart,values,scope){__cov_sIM21KhAGhzWP0B7wdkh_A.f['40']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['146']++;if(Array.isArray(scope.chartData[0])){__cov_sIM21KhAGhzWP0B7wdkh_A.b['52'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['147']++;chart.data.datasets.forEach(function(dataset,i){__cov_sIM21KhAGhzWP0B7wdkh_A.f['41']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['148']++;dataset.data=values[i];});}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['52'][1]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['149']++;chart.data.datasets[0].data=values;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['150']++;chart.update();__cov_sIM21KhAGhzWP0B7wdkh_A.s['151']++;scope.$emit('chart-update',chart);}function isEmpty(value){__cov_sIM21KhAGhzWP0B7wdkh_A.f['42']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['153']++;return(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][0]++,!value)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][1]++,Array.isArray(value))&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][2]++,!value.length)||(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][3]++,typeof value==='object')&&(__cov_sIM21KhAGhzWP0B7wdkh_A.b['53'][4]++,!Object.keys(value).length);}function isResponsive(type,scope){__cov_sIM21KhAGhzWP0B7wdkh_A.f['43']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['155']++;var options=angular.extend({},Chart.defaults.global,ChartJs.getOptions(type),scope.chartOptions);__cov_sIM21KhAGhzWP0B7wdkh_A.s['156']++;return options.responsive;}function destroyChart(chart,scope){__cov_sIM21KhAGhzWP0B7wdkh_A.f['44']++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['158']++;if(!chart){__cov_sIM21KhAGhzWP0B7wdkh_A.b['54'][0]++;__cov_sIM21KhAGhzWP0B7wdkh_A.s['159']++;return;}else{__cov_sIM21KhAGhzWP0B7wdkh_A.b['54'][1]++;}__cov_sIM21KhAGhzWP0B7wdkh_A.s['160']++;chart.destroy();__cov_sIM21KhAGhzWP0B7wdkh_A.s['161']++;scope.$emit('chart-destroy',chart);}}}));