Skip to content

Commit

Permalink
Merge pull request #14 from jasonlbeggs/jlb/fix-more-livewire-issues
Browse files Browse the repository at this point in the history
Fix a few more Livewire issues
  • Loading branch information
peterthomson authored Jun 4, 2024
2 parents d5b7412 + d276cd4 commit 6a7c6ab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/resources/views/chart-template-livewire.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
init() {
chart = this.initChart(this.$wire.{{ $model }})
this.$wire.$watch('{{ $model }}', () => {
this.$watch('$wire.{{ $model }}', () => {
this.updateChart(chart, this.$wire.{{ $model }})
})
},
Expand All @@ -97,7 +97,13 @@
let { labels, datasets } = dataset
chart.data.labels = labels
chart.data.datasets[0].data = datasets[0].data
if (chart.config.type === 'treemap') {
chart.data.datasets[0].tree = datasets[0].tree
} else {
chart.data.datasets[0].data = datasets[0].data
}
chart.update()
},
Expand Down

0 comments on commit 6a7c6ab

Please sign in to comment.