Beeswarm + maintain x-position of nodes
A beeswarm chart displays French word stems ranked by frequency and trend score, with each circle colored by rank from light green to pink. The visualization uses D3 v4's `d3.forceSimulation` to separate overlapping nodes while maintaining each circle’s original x-position based on its trend value. To achieve this, the tick function resets x coordinates each frame while progressively increasing the `d3.forceCollide` radius to reduce jitter. Hovering reveals a tooltip showing the stem, rank, and trend value.
AI-generated descriptionThis <a href='http://bl.ocks.org/Kcnarf/d4a745960538e937dcde13f61e9893f1'>block</a> is a continuation of a <a href='http://bl.ocks.org/Kcnarf/91c5e84bed1ba6b1541deaa5d5f4f258'>previous one</a>. The main difference resides in the version of D3 (eg. v3.5 VS v4-beta).
I was not totally satisfied of my previous block because nodes could overlap, making hovering of individual nodes possibly tedious. With the new/future release of D3 v4, this can be handled easily with the colision detection feature embeded in the new version of the force layout.
By the way, there is still some overlapping. Playing with forces' strength and/or radius/distance may help ...
Acknowledgments to:
- <a href='https://d3js.org/'>D3.js</a> (v4-beta)
- <a href='http://blockbuilder.org'>blockbuilder.org</a>
- This <a href='http://bl.ocks.org/Kcnarf/d4a745960538e937dcde13f61e9893f1'>block</a> is a continuation of a <a href='http://bl.ocks.org/Kcnarf/91c5e84bed1ba6b1541deaa5d5f4f258'>previous one</a>