I am trying to capture click/hover events from a 3D surface plot and generate new traces from where the user clicks, a.k.a. “picking”. For example, when the user clicks on a surface, a streamline is drawn through the point and the plot is updated.
html.Div([
dcc.Graph(id = 'main_graph' ),
html.Pre(id='hover-data', style=styles['pre']),
]
@app.callback(
Output('hover-data', 'children'),
[Input('main_graph', 'hoverData')])
def display_rover_data(hoverData):
return json.dumps(hoverData, indent=2)
But this doesn’t actually render the hover data as it would in the 2D example.