Accepted answer

You can use the following code to draw/add total count in your stacked horizontal bar chart :[0].data.forEach(function(data, index) {
   var total = data +[1].data[index];
   var meta = chartInstance.controller.getDatasetMeta(1);
   var posX =[index]._model.x;
   var posY =[index]._model.y;
   ctx.fillStyle = 'black';
   ctx.fillText(total, posX + 4, posY + 4);
}, this);

add this inside chart­'s animation onComplete function.

ʟɪᴠᴇ ᴅᴇᴍᴏ

Related Query

More Query from same tag