Chartjs-Charts.js fixed y label to 8 decimals

0👍

Try this, it should work.

var speedData = {
labels: [0,1,2,3,4,5,6,7,8,9],
 datasets: [{
label: "BTC-DOGE",
data: [0.00000008,0.00000042],
lineTension: 0,
fill: false,
borderColor: 'orange',
backgroundColor: 'transparent',
borderDash: [5,5],
pointBorderColor: 'orange',
pointBackgroundColor: 'rgba(255,150,0,0.5)',
pointRadius: 5,
pointHoverRadius: 10,
pointHitRadius: 30,
pointBorderWidth: 2,
pointStyle: 'rectRounded'
 }]
};
new Chart(document.getElementById("line-chart"), {
  type: 'line',
  data: speedData
});

Leave a comment