Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDouble counting in sund2b #78
Comments
|
Hi @monicarajamanohar I think this was fixed in |
|
@monicarajamanohar I updated
I will try to prepare a CRAN release by the end of the weekend. |
|
Thank you for the prompt response. I will wait for the CRAN release |
|
Any luck updating the CRAN? |
|
@monicarajamanohar just submitted so we'll see if it gets approved |
|
@monicarajamanohar this was accepted last night on CRAN. Please let me know once you get a chance to test. |
|
I checked and it works beautifully!!! Thank you for giving such a quick resolution :D. I will close the issue now. |

Hi,
I was trying to execute the following and I found that sund2b double counts the pre-summed tree. In sunburst, there is an option sumNode = FALSE to avoid double counting of presummed trees.
How can I do the same with sund2b?
Thanks
Monica
library(treemap)
library(d3r)
rhd <- random.hierarchical.data()
tm <- treemap(
rhd,
index = paste0("index", 1:3),
vSize = "x",
draw = FALSE
)$tm
sund2b(
d3_nest(tm, value_cols = colnames(tm)[-(1:3)]),
colors = htmlwidgets::JS(
# yes this is a little different, so please pay attention
# "function(d) {return d.color}" will not work
"function(name, d){return d.color || '#ccc';}"
),
valueField = "vSize"
)