1
我有一個基於可擴展圓包佈局示例綁定到分層數據集的可視化。D3圓圈包佈局算法
我看到一個給定深度的圓的區域沒有直接比較的問題,即比例爲2的值看起來在視覺上沒有相同比例的區域。
我預期將在包裝算法的一些錯誤,但由於以下日誌片段展示了它是非常顯著:
area = 708821.8424661972, value = 45888, area/d.value = 15.446780039796836, depth = 0 hiersortfilter.html:657
area = 26507.55404641439, value = 4654, area/d.value = 5.695649773617187, depth = 1 hiersortfilter.html:657
area = 26507.55404641439, value = 4654, area/d.value = 5.695649773617187, depth = 2 hiersortfilter.html:657
area = 113.6437117690809, value = 63, area/d.value = 1.8038684407790617, depth = 3 hiersortfilter.html:657
area = 113.6437117690809, value = 63, area/d.value = 1.8038684407790617, depth = 4 hiersortfilter.html:657
area = 113.6437117690809, value = 63, area/d.value = 1.8038684407790617, depth = 5 hiersortfilter.html:657
area = 0.9339196960560362, value = 1, area/d.value = 0.9339196960560362, depth = 6 hiersortfilter.html:657
area = 17.74447422506469, value = 19, area/d.value = 0.9339196960560363, depth = 6 hiersortfilter.html:657
area = 10.273116656616397, value = 11, area/d.value = 0.9339196960560361, depth = 6 hiersortfilter.html:657
area = 29.88543027379316, value = 32, area/d.value = 0.9339196960560362, depth = 6 hiersortfilter.html:657
area = 110.13198200238504, value = 58, area/d.value = 1.8988272759031903, depth = 3 hiersortfilter.html:657
area = 110.13198200238504, value = 58, area/d.value = 1.8988272759031903, depth = 4 hiersortfilter.html:657
area = 110.13198200238504, value = 58, area/d.value = 1.8988272759031903, depth = 5 hiersortfilter.html:657
area = 8.405277264504326, value = 9, area/d.value = 0.9339196960560362, depth = 6 hiersortfilter.html:657
area = 15.876634832952611, value = 17, area/d.value = 0.933919696056036, depth = 6 hiersortfilter.html:657
area = 7.47135756844829, value = 8, area/d.value = 0.9339196960560362, depth = 6 hiersortfilter.html:657
area = 11.207036352672434, value = 12, area/d.value = 0.9339196960560362, depth = 6 hiersortfilter.html:657
area = 11.207036352672434, value = 12, area/d.value = 0.9339196960560362, depth = 6 hiersortfilter.html:657
area = 2155.192321114232, value = 669, area/d.value = 3.221513185522021, depth = 3 hiersortfilter.html:657
area = 2155.192321114232, value = 669, area/d.value = 3.221513185522021, depth = 4 hiersortfilter.html:657
area = 567.0544456457064, value = 349, area/d.value = 1.6247978385263795, depth = 5
我很高興能進一步挖掘和嘗試,並進行調試,但是在做之前如此想檢查我對算法的理解是否正確,即每個單位面積的面積比應該在所有級別上理想地保持不變,並且如果至少對於給定的深度不變,