Merge pull request #13567 from oele-dev/fix-stats-overview-widget-charts-randomly-change-color-when-resizing-browser

Fix #13518
This commit is contained in:
Dan Harrin
2024-07-21 10:29:57 +01:00
committed by GitHub
@@ -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
},
],
},