1👍
✅
Finally i solved with a workaround .. using Window setTimeout() Method:
var ctx = $("#myChart");
var myChart = new Chart(ctx, chart);
function AlertFunc (chart) {
chart.options.sort = true;
chart.update();
chart.options.sort = false;
}
window.setTimeout(function () { AlertFunc(myChart); }, 2000)
0👍
I had a same problem. Fixed it by change animation.duration
from 0
to 0.1
:
chart.options.animation = {
duration: 0.1,
...
}
Source:stackexchange.com