Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- animation: {
- onComplete: function () {
- var chartInstance = this.chart,
- ctx = chartInstance.ctx;
- ctx.textAlign = 'center';
- ctx.fillStyle = "rgba(0, 0, 0, 1)";
- ctx.textBaseline = 'bottom';
- this.data.datasets.forEach(function (dataset, i) {
- var meta = chartInstance.controller.getDatasetMeta(i);
- meta.data.forEach(function (bar, index) {
- var data = dataset.data[index];
- ctx.fillText(data, bar._model.x, bar._model.y - 5);
- });
- });
- }
Add Comment
Please, Sign In to add comment