Change the cursor to pointer/default when hover over graph

I was struggling too with the cursor. I’ve found a solution. It’s possible to override the default css settings. This answer was a big help to me:

The key is to create a folder named “assets” in the same directory where your .py- file is stored. In the folder “assets” you create a file “my-desired-name.css”. The css file contains this piece of code:

.js-plotly-plot .plotly .cursor-ew-resize {
cursor: crosshair;
}

Don’t forget to add the css as an external stylesheet in your python script:
app = dash.Dash(__name__, external_stylesheets=['my-desired-name.css'])

1 Like