If I run webdev serve then ChartTooltipOptions callbacks work perfectly.
Inside new ChartOptions()
//snip tooltips: new ChartTooltipOptions( callbacks: new ChartTooltipCallback(label: (item, data) { String ele = item.xLabel; Set names = new Set(); nameList.forEach((a) { names.add(a); } }); return names.toList(); }, title: (_) { return "Title"; })) //snip
Once I webdev build and run on a live site then the chart hangs with an error:
Chart.bundle.js:13069 Uncaught TypeError: callbacks.title.apply is not a function at ChartElement.getTitle (Chart.bundle.js:13069) at ChartElement.update (Chart.bundle.js:13196) at ChartElement.handleEvent (Chart.bundle.js:13531) at Chart.eventHandler (Chart.bundle.js:8952) at listener (Chart.bundle.js:8886) at HTMLCanvasElement.proxies
I've also replaces my Chart.bundle.js with the CDN Chart.js from the example. Same result - works when being served locally, doesn't work once compiled.
I've also removed the title callback and then I get the same error with the label callback: callbacks.label.apply is not a function
If I run webdev serve then ChartTooltipOptions callbacks work perfectly.
Inside new ChartOptions()
//snip tooltips: new ChartTooltipOptions( callbacks: new ChartTooltipCallback(label: (item, data) { String ele = item.xLabel; Set names = new Set(); nameList.forEach((a) { names.add(a); } }); return names.toList(); }, title: (_) { return "Title"; })) //snip
Once I webdev build and run on a live site then the chart hangs with an error:Chart.bundle.js:13069 Uncaught TypeError: callbacks.title.apply is not a function at ChartElement.getTitle (Chart.bundle.js:13069) at ChartElement.update (Chart.bundle.js:13196) at ChartElement.handleEvent (Chart.bundle.js:13531) at Chart.eventHandler (Chart.bundle.js:8952) at listener (Chart.bundle.js:8886) at HTMLCanvasElement.proxies
I've also replaces my Chart.bundle.js with the CDN Chart.js from the example. Same result - works when being served locally, doesn't work once compiled. I've also removed the title callback and then I get the same error with the label callback: callbacks.label.apply is not a function