Chartjs-Chart js – render images on only one dataset

2👍

Based on documentation, you can use:

labels: {
  render: function (args) {
    // { label: 'Label', value: 123, percentage: 50, index: 0, dataset: {...} }
    // index - datasetIndex
    if (args.index == 1) {
       return { src: 'url', width: 25, height: 25 };
    }

    return undefined;
  },
},

Leave a comment