This block is a continuation of a previous one.
This sequel experiments a way to vizualise the distribution of things (whatever it is) in a horizontal way (ie. along the x-axis), where constraints/objectives are:
- to maintain the exact position of each datum (represented by a circle) along the x-axis
- to be able to hover each circle to show related datum
This block produces a beeswarm in 2 stages:
- define a first arrangement using a custom algorythm (cf. previous block)
- then, use the ForceLayout in order to group extreme accumulations, or constraint the arrangement to a certain size
The ForceLayout is used only few times (5 iterations by default) in order to handle computation time. For comparison, with 600 points:
- ~1200 ms <== Force only with ~300 iterations
- ~ 100 ms <== custom only | extreme acc., no overlap, fast
- ~ 150 ms <== custom (100ms) + force with 5 iterations (50ms) |some overlap, no extreme acc., fast
- ~ 150ms <== Force only with ~20 iterations | cons: not so beautiful, some overlap, no extreme acc., fast
Acknowledgments to: