score:2

this can be achieved by combining chartjs-plugin-datalabels with chartjs-plugin-labels as follows:

new chart(document.getelementbyid('mychart'), {
  type: 'bar',
  data: {
    labels: ['2009', '2010', '2011', '2012'],
    datasets: [{
      label: 'my first dataset',
      data: [25, 59, 80, 76],
      fill: false,
      backgroundcolor: ['rgba(255, 99, 132, 0.2)', 'rgba(255, 159, 64, 0.2)', 'rgba(255, 205, 86, 0.2)', 'rgba(75, 192, 192, 0.2)'],
      bordercolor: ['rgb(255, 99, 132)', 'rgb(255, 159, 64)', 'rgb(255, 205, 86)', 'rgb(75, 192, 192)', 'rgb(54, 162, 235)'],
      borderwidth: 1
    }]
  },
  options: {
    plugins: {
      datalabels: {
        anchor: 'end',
        align  : 'start'        
      },
      labels: {
        render: 'image',
        textmargin: -60,
        images: [
          null, 
          null, 
          {
            src: 'https://i.stack.imgur.com/9emtu.png',
            width: 20,
            height: 20
          },
          null
        ]
      }
    },
    scales: {
      yaxes: [{
        ticks: {
          beginatzero: true
        }
      }]
    }
  }
});
canvas {
  max-width: 300px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.9.3/chart.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels"></script>
<script src="https://cdn.jsdelivr.net/gh/emn178/chartjs-plugin-labels/src/chartjs-plugin-labels.js"></script>
<canvas id="mychart" width="10" height="5"></canvas>


Related Query

More Query from same tag