Guest User

Untitled

a guest
May 23rd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. animation: {
  2. onComplete: function () {
  3. var chartInstance = this.chart,
  4. ctx = chartInstance.ctx;
  5. ctx.textAlign = 'center';
  6. ctx.fillStyle = "rgba(0, 0, 0, 1)";
  7. ctx.textBaseline = 'bottom';
  8.  
  9. this.data.datasets.forEach(function (dataset, i) {
  10. var meta = chartInstance.controller.getDatasetMeta(i);
  11. meta.data.forEach(function (bar, index) {
  12. var data = dataset.data[index];
  13. ctx.fillText(data, bar._model.x, bar._model.y - 5);
  14.  
  15. });
  16. });
  17. }
Add Comment
Please, Sign In to add comment