Black Lives Matter. Please consider donating to Black Girls Code today.

Bubble chart's lengend too big

Hi there I am trying to change the size of the bubble size of the legend, to the same, smaller size. But I don’t know how. Obviously it shows same size as the actual chart.

Please check the screenshot.
Thanks,

The legend item text is determined by trace name.

To remove an item from the legend, try setting showlegend: false in its corresponding trace object.

Hi, thanks for your reply.

I don’t want to remove the text from the chart, I just want to show the bubble of the legend to be same size because it’s going to be very difficult to see what’s going on, such as
○ facility A
○ facility B
○ facility C

Now each legend has it’s own size as in the chart, I don’t want that because it’s messy and only makes it difficult to read.
I thought there’s some way to unify the size of these.
Thanks,

Solved!
I was setting the marker size to be non-array, but changed to the array with one value, it worked fine. view_data.push({
text: hover[i],
x: [x[i]],
y: [y[i]],
mode: ‘markers’,
type: ‘scatter’,
name: [texts[i]],
marker: { size: [12]},//<<<set array instead of numeric value
opacity:0.4,
hoverinfo: ‘text’
});