Chartjs-I want to add label on only specific vue chart

1๐Ÿ‘

โœ…

If you dont register it globally but only locally in the plugins array it will only activate for that chart

Example (only the first chart will have labels):

var chart = {
  type: 'pie',
  plugins: [chartjsPluginDatalabels],
  data: {},
  options: {}

var chart2 = {
  type: 'pie',
  plugins: [],
  data: {},
  options: {}

Codepen live example: https://codepen.io/leelenaleee/pen/yLgmmyd

Leave a comment