score:0

Accepted answer

you will need to override the default label callback so it doesnt do any formatting:

var options = {
  type: 'line',
  data: {
    labels: ["red", "blue", "yellow"],
    datasets: [{
      label: '# of votes',
      data: [0.00000023120098, 0.00000887272934, 0.00000343234],
      bordercolor: 'pink'
    }]
  },
  options: {
    plugins: {
      tooltip: {
        callbacks: {
          label: (ctx) => (`${ctx.dataset.label}: ${ctx.raw}`)
        }
      }
    }
  }
}

var ctx = document.getelementbyid('chartjscontainer').getcontext('2d');
new chart(ctx, options);
<body>
  <canvas id="chartjscontainer" width="600" height="400"></canvas>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/3.7.1/chart.js"></script>
</body>


Related Query

More Query from same tag