Chartjs-ChartJS line chart x = y not rendering astraight line

0👍

If you were to change your fake data function to be:

function generateFakeData() {
  var res = [];
  res[0] = 0;
  res[200] = 200;
  return res;
}

and add spanGaps: true to the options, the line will be nice and straight, otherwise the way the pixels line up will make it look jagged as it tries to connect each one.

Not sure if this helps with your use case.

Leave a comment