diff --git a/packages/widgets/resources/js/components/stats-overview/stat/chart.js b/packages/widgets/resources/js/components/stats-overview/stat/chart.js index af3579fdcd..711438e901 100644 --- a/packages/widgets/resources/js/components/stats-overview/stat/chart.js +++ b/packages/widgets/resources/js/components/stats-overview/stat/chart.js @@ -41,13 +41,6 @@ export default function statsOverviewStatChart({ }, initChart: function () { - Chart.defaults.backgroundColor = getComputedStyle( - this.$refs.backgroundColorElement, - ).color - - Chart.defaults.borderColor = getComputedStyle( - this.$refs.borderColorElement, - ).color return new Chart(this.$refs.canvas, { type: 'line', @@ -59,6 +52,12 @@ export default function statsOverviewStatChart({ borderWidth: 2, fill: 'start', tension: 0.5, + backgroundColor : getComputedStyle( + this.$refs.backgroundColorElement, + ).color, + borderColor : getComputedStyle( + this.$refs.borderColorElement, + ).color }, ], },