[Chartjs]-Line chart issue. Chart JS

1👍

The reason is that labels is defined at the wrong place.

var seirdsChart = new Chart("seirdsChart", {
  type: 'line',
  labels: label,
  data: {
    datasets: [
      ...

It should be defined inside data as follows:

var seirdsChart = new Chart("seirdsChart", {
  type: 'line',      
  data: {
    labels: label,
    datasets: [
      ...

Leave a comment