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BAAkB,YACpCA,EAAc,aAAc,QAC7BA,EAAc,YAAa,OACrBA,EAAc,cAAe,aACjCA,EAAc,cAAe,SAC5BA,EAAc,eAAgB,UAC7BA,EAAc,gBAAiB,U","sources":["webpack://app/./node_modules/vue-chartjs/es/mixins/index.js","webpack://app/./node_modules/vue-chartjs/es/BaseCharts.js"],"sourcesContent":["function dataHandler(newData, oldData) {\n if (oldData) {\n var chart = this.$data._chart;\n var newDatasetLabels = newData.datasets.map(function (dataset) {\n return dataset.label;\n });\n var oldDatasetLabels = oldData.datasets.map(function (dataset) {\n return dataset.label;\n });\n var oldLabels = JSON.stringify(oldDatasetLabels);\n var newLabels = JSON.stringify(newDatasetLabels);\n\n if (newLabels === oldLabels && oldData.datasets.length === newData.datasets.length) {\n newData.datasets.forEach(function (dataset, i) {\n var oldDatasetKeys = Object.keys(oldData.datasets[i]);\n var newDatasetKeys = Object.keys(dataset);\n var deletionKeys = oldDatasetKeys.filter(function (key) {\n return key !== '_meta' && newDatasetKeys.indexOf(key) === -1;\n });\n deletionKeys.forEach(function (deletionKey) {\n delete chart.data.datasets[i][deletionKey];\n });\n\n for (var attribute in dataset) {\n if (dataset.hasOwnProperty(attribute)) {\n chart.data.datasets[i][attribute] = dataset[attribute];\n }\n }\n });\n\n if (newData.hasOwnProperty('labels')) {\n chart.data.labels = newData.labels;\n this.$emit('labels:update');\n }\n\n if (newData.hasOwnProperty('xLabels')) {\n chart.data.xLabels = newData.xLabels;\n this.$emit('xlabels:update');\n }\n\n if (newData.hasOwnProperty('yLabels')) {\n chart.data.yLabels = newData.yLabels;\n this.$emit('ylabels:update');\n }\n\n chart.update();\n this.$emit('chart:update');\n } else {\n if (chart) {\n chart.destroy();\n this.$emit('chart:destroy');\n }\n\n this.renderChart(this.chartData, this.options);\n this.$emit('chart:render');\n }\n } else {\n if (this.$data._chart) {\n this.$data._chart.destroy();\n\n this.$emit('chart:destroy');\n }\n\n this.renderChart(this.chartData, this.options);\n this.$emit('chart:render');\n }\n}\n\nexport var reactiveData = {\n data: function data() {\n return {\n chartData: null\n };\n },\n watch: {\n 'chartData': dataHandler\n }\n};\nexport var reactiveProp = {\n props: {\n chartData: {\n type: Object,\n required: true,\n default: function _default() {}\n }\n },\n watch: {\n 'chartData': dataHandler\n }\n};\nexport default {\n reactiveData: reactiveData,\n reactiveProp: reactiveProp\n};","import Chart from 'chart.js';\nexport function generateChart(chartId, chartType) {\n return {\n render: function render(createElement) {\n return createElement('div', {\n style: this.styles,\n class: this.cssClasses\n }, [createElement('canvas', {\n attrs: {\n id: this.chartId,\n width: this.width,\n height: this.height\n },\n ref: 'canvas'\n })]);\n },\n props: {\n chartId: {\n default: chartId,\n type: String\n },\n width: {\n default: 400,\n type: Number\n },\n height: {\n default: 400,\n type: Number\n },\n cssClasses: {\n type: String,\n default: ''\n },\n styles: {\n type: Object\n },\n plugins: {\n type: Array,\n default: function _default() {\n return [];\n }\n }\n },\n data: function data() {\n return {\n _chart: null,\n _plugins: this.plugins\n };\n },\n methods: {\n addPlugin: function addPlugin(plugin) {\n this.$data._plugins.push(plugin);\n },\n generateLegend: function generateLegend() {\n if (this.$data._chart) {\n return this.$data._chart.generateLegend();\n }\n },\n renderChart: function renderChart(data, options) {\n if (this.$data._chart) this.$data._chart.destroy();\n if (!this.$refs.canvas) throw new Error('Please remove the tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components');\n this.$data._chart = new Chart(this.$refs.canvas.getContext('2d'), {\n type: chartType,\n data: data,\n options: options,\n plugins: this.$data._plugins\n });\n }\n },\n beforeDestroy: function beforeDestroy() {\n if (this.$data._chart) {\n this.$data._chart.destroy();\n }\n }\n };\n}\nexport var Bar = generateChart('bar-chart', 'bar');\nexport var HorizontalBar = generateChart('horizontalbar-chart', 'horizontalBar');\nexport var Doughnut = generateChart('doughnut-chart', 'doughnut');\nexport var Line = generateChart('line-chart', 'line');\nexport var Pie = generateChart('pie-chart', 'pie');\nexport var PolarArea = generateChart('polar-chart', 'polarArea');\nexport var Radar = generateChart('radar-chart', 'radar');\nexport var Bubble = generateChart('bubble-chart', 'bubble');\nexport var Scatter = generateChart('scatter-chart', 'scatter');\nexport default {\n Bar: Bar,\n HorizontalBar: HorizontalBar,\n Doughnut: Doughnut,\n Line: Line,\n Pie: Pie,\n PolarArea: PolarArea,\n Radar: Radar,\n Bubble: Bubble,\n Scatter: Scatter\n};"],"names":["generateChart","chartId","chartType","render","createElement","style","this","styles","class","cssClasses","attrs","id","width","height","ref","props","default","type","String","Number","Object","plugins","Array","data","_chart","_plugins","methods","addPlugin","plugin","$data","push","generateLegend","renderChart","options","destroy","$refs","canvas","Error","getContext","beforeDestroy","Bar"],"sourceRoot":""}