mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
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:
@@ -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
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user