Best way to add shapes to interrelated graphs

Hello, I’m making an app where the user can make multiple graphs. Let’s say they can make two graphs: a scatter and a heatmap. And they can add as many as they want with a button.

So let’s say I have scatter1, scatter2, heatmap1, heatmap2.

One thing I would like to do is have the user select a range on scatter1, and have that range apply a shape on the other three graphs, as well as updated some metadata that the user exports later.

I’ve figured out how to get that far, but I’m not sure I’m doing it the best way. My current way: have a single callback for scatter1 and scatter2 type graphs. And a separate callback for heatmap1 and heatmap2 graphs.

So each graph type gets its own set of callbacks listening for selection changes.

I wonder instead if I should instead have some common overlay graph or extra go.Scatter that is added to all of the graphs. Something that takes the shape, so to speak, of the overall size of the graph. And listen to changes on that common overlay instead.

Is that a better way to go? Or are there other things I’m not thinking of?

Thanks!