Hi,
I have a problem when trying to use ‘Box Select’ option for extracting selected points. Namely, I’ve created a figure which enables multiple subplots on it. First subplot acts like a main subplot and it has ‘secondary_y’ option disabled. All others have that option enabled because they have different y-axis values. Common thing for all subplots is that they have common x-axis.
fig = make_subplots(specs=[[{"secondary_y": True}]])
...
fig.add_trace(
go.Scatter(
x=x_data,
y=y_data,
mode=some_mode,
name=some_name,
yaxis="y" + str(i+1), # property defined only for subplots except the main one
),
secondary_y=True, # or False in case of main plot
)
I’ve created a callback which reacts upon triggering ‘selectedData’ property. When I’m creating selection box on the figure, it captures all the points within that box from all the plots. Problem emerges when I’m trying to resize that box. In that case, only points from the main subplot are recognized (markers are being shown and ‘selectedData’ points field has some values) while points from other subplots aren’t recognized at all (neither on the plot, nor within ‘selectedData’ points list).
When in debug mode, I see that ‘selectedPoints’ field is empty for each Scatter plot, if they’re not selected initially.
I’d like to know, how could I extract those selected points from those subplots?