christophergandrud / networkD3

D3 JavaScript Network Graphs from R
http://christophergandrud.github.io/networkD3
652 stars 268 forks source link

sunburstOutput broken by htmlwidgets 0.7? #199

Closed neilcharles closed 7 years ago

neilcharles commented 7 years ago

Thanks for the package, it's brilliant.

I had some shiny code which generated a Sunburst, but since updating my R libraries it's broken. I think maybe what's done it is updating htmlwidgets to v0.8. Attached is the error from my browser console.

2017-06-06_12-44-10

Possible that htmlwidgets may have updated to use D3 v4 and d3.rebind no longer exists in that version? I'd roll back but I also need the latest Plotly, which wants htmlwidgets 0.8.

The sunburst does render in RStudio's viewer window but not in the browser. I can render sankeyNetworkOutput with no problems.

R 3.3.3 networkD3 0.4 htmlwidgets 0.8 Chrome 56.0.2924.87 (64-bit)

cjyetman commented 7 years ago

are you sure you're not using @timelyportfolio's sunburstR package?

christophergandrud commented 7 years ago

networkD3 doesn't currently support sunbursts. Though if you got it to do so, that would be interesting to see.

neilcharles commented 7 years ago

Sorry, I'm an idiot. Will try fixing the correct thing.

christophergandrud commented 7 years ago

No worries! Thanks for your interest in the package.

timelyportfolio commented 7 years ago

@neilcharles, the issue is sunburst uses d3v3 and networkD3 has upgraded to d3v4. For a fuller discussion, see https://github.com/christophergandrud/networkD3/issues/143. I plan to upgrade sunburstR to use a standalone JS file to allow these to peacefully coexist. Until then, there is not a clean workaround. Sorry.