[Chartjs]-Add Y-Axis dynamically Chartjs

1👍

I wanted to provide an answer as I solved my own issue and in case anyone has a similar question.

What I ended up doing was pushing a completely new dataset that aligned with the Y-Axis.

myChart.data.datasets.push(createNewDataset('Your Label', '', YourArrayOfData, 0, 'y-axis-1'));

the important part for me was putting the y-axis-1 which set the new axis on the right hand side.

Leave a comment