Skip to content

Include formula for sizeref in bubble charts #776

Open
@chriddyp

Description

@chriddyp

sizeref is a tough one and it's hard to guess it correctly.

In the chart editor, we use this formula to compute a reasonably sized sizeref:

desired_maximum_marker_size = 40 # at most, the marker will be 40px in diameter
marker = dict(
    sizeref = 2 * max(your_list_of_size_values) / (desired_maximum_marker_size**2),
    sizemode = 'area'
)

We also expose the sizemin property in cases points are too small to see.

I recommend that we update the "Scaling the Size of Bubble Charts" example to use this formula
image

I just explained this to a Dash user here: https://community.plot.ly/t/scatter-plot-size-from-x-and-y-difference/4749/2?u=chriddyp

cc @cldougl @bcdunbar @Kully

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions