Plotly.js adding yAxis dynamically

Hi,

I am trying to add a trace and its corresponding yAxis on click of a button to my plot. Please check the attached codepen and let me know if i am doing anything wrong ?

plotly axes are labelled as y, y2, y3

Your code generate y0, y1, y2

Other than that things are looking fine.

I just figured that. Thanks

1 Like