Chartjs-ChartJS non overlapping lines

0👍

Giving the dataset’s data both X and Y solved the problem. Now it is like:

this.chart.datasets = [
  {
    data: [
      { x: newDate(-4), y: 65 },
      { x: newDate(-3), y: 59 },
      { x: newDate(-2), y: 80 }
    ],
    label: 'Series A'
  },
  {
    data: [
      { x: newDate(-3), y: 65 },
      { x: newDate(-2), y: 59 },
      { x: newDate(-1), y: 80 }
    ],
    label: 'Series A'
  },
  {
    data: [
      { x: newDate(-2), y: 65 },
      { x: newDate(-1), y: 59 },
      { x: newDate(0), y: 80 }
    ],
    label: 'Series A'
  }
];

enter image description here

Leave a comment