jtrim-ons/accurate-beeswarm-plot

Per-dot sizing

Opened this issue · 1 comments

jtfell commented

Hi.

Is it possible to modify this library to work for dots of different sizes?

I'm looking to create something like this using svelte:
https://flowingdata.com/wp-content/uploads/2021/06/hospital-billing-400x250.png

I'm happy to have a go at submitting a PR, but I thought I'd ask if you had any pointers before I started.

Hi @jtfell , I have some code on Observable that should hopefully do the trick. It seems to work okay, but I wrote it in a bit of a rush and haven't tested it well, hence all the caveats in the notebook :-)

I'm not a big fan of force-directed beeswarms. (I think the image you sent might be force directed?) Even though they usually only have slight inaccuracies, the purist in me likes to have the dots at their exact x positions.

I don't have plans at the moment to add dots of different sizes to accurate-beeswarm-plot.

I'd be very happy to discuss beeswarms more - I went through a short phase of being obsessed with them!