问题
This is an improved question based on my previous post:
How to cluster bubble chart with many groups
I worked on my code and has updated the block( based on Amber Thomas' script): https://blockbuilder.org/lydiawawa/1fe3c80d35e046c1636663442f34680b
The animation toggles between mixed clusters and split clusters. It has too many jitters and the cluster with more dots seem to have none stop colliding effect.
I'm hoping to achieve the following effect (v4 updated):
https://bl.ocks.org/lydiawawa/1fe3c80d35e046c1636663442f34680b/86d1bda1dabb7f3a6d11cb1a16053564078ed964
Force cluster:
https://github.com/ericsoco/d3-force-cluster
Based on: https://bl.ocks.org/mbostock/7881887
The clusters are separated by Race (or possibly by Gender combined?) and it should be centered on the canvas, my current code seems to extend the clusters horizontally. Any help is appreciated.
Let me know if more clarification is needed.
来源:https://stackoverflow.com/questions/55877208/reduce-jitters-and-center-cluster-bubble-animation