Chartjs-How to show bar value on the top of each bar in chartjs

0👍

You can try

    onAnimationComplete: function () {    
        var ctx = this.chart.ctx;
        ctx.font = this.scale.font;
        ctx.fillStyle = this.scale.textColor
        ctx.textAlign = "center";
        ctx.textBaseline = "bottom";

        this.datasets.forEach(function (dataset) {
            dataset.bars.forEach(function (bar) {
                ctx.fillText(bar.value, bar.x, bar.y - 5);
            });
        })
    }

used following link

http://jsfiddle.net/TZq6q/304/

-3👍

set “inGraphDataShow: true” in your code it will display all values on top of bar

Leave a comment