Chart.js datalabels plugin throwing console error

I need the chartjs datalabels plugin and this is the same plugin that is included in the documentation so I followed the steps verbatim (https://filamentphp.com/docs/3.x/widgets/charts#using-custom-chartjs-plugins). However, the data label is not being rendered and receiving console error
t is null
t is null
Alpine Expression Error: t is null

Expression: "function(){this.initChart(),this.$wire.$on("updateChartData",({data:i})=>{bn=this.getChart(),bn.data=i,bn.update("resize")}),Alpine.effect(()=>{Alpine.store("theme"),this.$nextTick(()=>{this.getChart()&&(this.getChart().destroy(),this.initChart())})}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Alpine.store("theme")==="system"&&this.$nextTick(()=>{this.getChart().destroy(),this.initChart()})})}"
Alpine Expression Error: t is null

Expression: "function(){this.initChart(),this.$wire.$on("updateChartData",({data:i})=>{bn=this.getChart(),bn.data=i,bn.update("resize")}),Alpine.effect(()=>{Alpine.store("theme"),this.$nextTick(()=>{this.getChart()&&(this.getChart().destroy(),this.initChart())})}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Alpine.store("theme")==="system"&&this.$nextTick(()=>{this.getChart().destroy(),this.initChart()})})}"
Any suggestions on resolving this?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?