Chartjs-ChartJs React – How do I stop ChartJs from rounding my figures to 3 decimal points on the tooltip?

0👍

try to use label callback it can modify your tooltip text

change your options to

  const options = {
    responsive: true,
    plugins: {
      legend: {
        display:false
      },
      title: {
        display: true,
        text: 'Price',
      },
      tooltip: {
        callbacks: {
          label: function(context) {
            return context.dataset.label;
          }
        } 
      }
    },

  };

Leave a comment