The above code works as expected. Upon click, a data point is selected (coloured) in both graphs.
This topic was created in regard to the same functionality, but for scatter3d. If you change the trace type to ‘scatter3d’, the program crashes (caught in a on-click loop). The minimum example to showcase the error is as follows:
The problem stems from restyling a scatter3d graph upon click. I’m fairly new to both plotly and javascript. Pointers in the right direction are appreciated, especially if I’m missing something elementary.