Chartjs-How to customise the tooltip in the line chart in vuejs /chart js

1👍

You can use the callbacks property of the tooltip configuration to define a custom function that generates the tooltip label

...
tooltip {
  displayColors: false,
  callbacks: {
    title: function () {
      return '';
    },
    label: function (context) {
      const date = context.label;
      const value = context.parsed.y;
      return `${value} Answers ${date}`;
    },
  },
};

Leave a comment