Chartjs-Chart JS: Use function in tooltip template

1๐Ÿ‘

โœ…

I am making this an answer so it is easier to find for future reference. The problem was the templating engine not being able to handle functions, or something of that nature. But using the other way of templating seems to work:

multiTooltipTemplate: function(chartData){
  return chartData.label+" : " + formatMoney(chartData.value, 2);
}

Leave a comment