Skip to content
Advertisement

How to display data values on Chart.js

Is it possible using Chart.js to display data values?

I want to print the graph.

Thanks for any advice..

Advertisement

Answer

There is an official plugin for Chart.js 2.7.0+ to do this: Datalabels

Otherwise, you can loop through the points / bars onAnimationComplete and display the values


Preview

Enter image description here


HTML

JavaScript

Script

JavaScript

Fiddle – http://jsfiddle.net/uh9vw0ao/

Advertisement