holtzy / D3-graph-gallery

A collection of simple graphics made with D3.js
https://www.d3-graph-gallery.com
MIT License
792 stars 234 forks source link

overlapped hierarchical maptree #17

Closed Zhang-Jianwei-issas closed 4 years ago

Zhang-Jianwei-issas commented 4 years ago

Dear Yan, I'm a novice at dataviz. I'm struggling on visualizing my data using ggraph with multiple hierarchical levels. I got some thing wrong.

when I plot under default mode ggraph() , it works well. But it resulted in overlapped layout when I want to set the node size based on variable mean under weight mode ggraph(weight=mean).

I have been struggling for several days, and don't know where to improve it.

Any suggestions would be appreciated.

please find my data in the attachment.

please pay attention to line 22-37 in my R script, which denote two subsets of my data, both work well under default mode, but one works under weight mode and the other fails.

test.zip