I'm trying to populate 3 lines on graph using ng2-charts like this:
updateOrdersChartOptions(ordersChartData: AllDocsView2Chart) {
if (ordersChartData) {
for (let i = 0; i < ordersChartData.linesData.length; i++) {
for (let j = 0; j < ordersChartData.linesData[i].length; j++) {
this.lineChartData.datasets[0].data[j] = ordersChartData.linesData[i][j];
console.log(ordersChartData.linesData[i][j]);
}
}
this.lineChartData.labels = ordersChartData.chartLabel;
this.chart?.update();
}
}
but the chart only shows the values in the first set - see screenshot

all data displays in the console correctly:
So my question is how do I show the three sets of data coming back from api call?

resolved the problem - I made the mistake of not passing i-index into datasets
now the chart looks like this:
which is what I was looking for