0👍
Probally you’re forgetting two things.
First: You need select the chart, something like this:
var ctx = document.getElementById("myChart").getContext('2d');
for use:
var myChart = new Chart(ctx, {
type: 'bar',
data: {//your code to build chart}
Second: myChart.update();
chartjs.org/docs/latest/
chartjs.org/docs/latest/developers/updates.html
- Chartjs-Custom tooltip in Chart JS(React implementation) works incorrectly with interaction intersect false
- Chartjs-How to toggle between Custom tooltip and normal tooltip in chartjs and angular
Source:stackexchange.com