Main problem is that color-scale legend entry sizes are tied to the data(!).
This can easily be seen by changing the size vlaue for “central coast” in this page you previously linked to https://codepen.io/etpinard/pen/LBWKBJ?editors=1010.
How could color-scale legend entries possibly be sized to what’s in the data? What would be driving the size of the bubble then? The average across the trace?
This type of legend behavior makes this entire chart type a nonstarter. It’s impossible to show a bubble chart with categorical coloring, if one of the categories has an unusual value in the size variable. I’ll need to revert to normal scatterplots where this behavior is not broken.
Please please have a look at ggplot and the correct treatment of chart aestetics and mappings. Color and size are 2 different aesthetics, mapped to 2 different scales, and should have different legends, each of which show variation in that 1 aesthetic. I dunno guys, plotly has some really cool features but coolness doesn’t override readability. And personally i can’t be spending hours trying to make legends do what legends should do. Which is explain whats in the chart in a clear way.