plotly.js
plotly.js copied to clipboard
Buttons to choose 'hover to closest' and 'hover to compare' disappear since version 2.0
Buttons to choose 'hover to closest' and 'hover to compare' disappear in versions from 2.0.0 to 2.3.1. See repo here https://codepen.io/zyzhu/pen/BaREOVg

Buttons are there in 1.58.4

If I change version to plotly-latest.min.js. The buttons show up.

You could use v1hovermode or hovercompare, hoverclosest, togglehover and togglespikelines in config similar to this codepen. Please see #5654 for more info.
In addition you could use layout.modebar.add. Please see #5660.
Thanks for pointing that out. I didn't find v1hovermode, hovercompare, hoverclosest in the documentation here https://plotly.com/javascript/configuration-options/#remove-modebar-buttons. Adding togglehover only does not work. Maybe the documentation shall be updated.