Not getting a clickData callback from a part of a figure

I have a figure within a dcc Graph element, like such:

fig1 = go.Figure(
        data=go.Mesh3d(
            x=self.x, y=self.y, z=self.z,
            i=self.i, j=self.j, k=self.k,
            hoverinfo='none'))
fig2 = go.Figure(
        data=go.Scatter3d(
            x=self.x, y=self.y, z=self.z,
            mode='markers',
            hoverinfo='none',
            marker=dict(
                size=self._sizes(m_size), 
                color=self._colors(m_color))))
fig = go.Figure(
        data=fig1.data + fig2.data)

Which go into:

dcc.Graph(
        id='thing',
        figure=fig)

I have a callback that triggers upon clicking on this figure. However, the clickData info shows only the points in the 3d mesh and not the scatter plot points. How can that be resolved?
Is it possible that only one part of the figure triggers the callback (I only want the callback to be triggered by the scatter plot)?

Hi @ac13 I can’t reproduce this.

yes, you can set hoverinfo='skip in the concerning trace. An example here:

Thank you.
Setting hoverinfo to ‘skip’ was the solution I was looking for.

1 Like