Skip to content Skip to sidebar Skip to footer

Where Put "multitooltiptemplate" In Chart.js V2.x

i want to change the 'label' for the 'datasetlabel' width 'multiTooltipTemplate'. But i find the solution only for the previous version of chart.js Can you tell me how to convert t

Solution 1:

Your options object should be

...
options: {
  tooltips: {
    callbacks: {
      label: function(tooltipItem, data) {
        var datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';
        return datasetLabel + ' : ' + tooltipItem.yLabel + ' €';
      }
    }
  }
}
...

Post a Comment for "Where Put "multitooltiptemplate" In Chart.js V2.x"