I'm using plotly to plot some points, if these points satisfy a condition I'd like the hoverinfo that plotly shows when you hover near the point to display.
desired pseudo code
z = {'x': x_val, 'y': y_val , 'type' : 'scatter' , 'mode' : 'markers',
'hoverinfo': 'text', 'hovermode' : 'closest'}
z['text'] = text
// check condition
if ( condition)
{
z['hovermode'] = 'on' //plotly doesn't have 'on' as a setting :(
}
Unfortunately the only options for hovermode appear to be: closest, x, y, and false.
Is there any way to activate hoverinfo? I know I could set mode = 'markers + text' but it isn't as pretty.