Open andreamrau opened 8 years ago
Actually, I see that d3heatmap seems to work just fine in flexdashboard in tandem with plotly and metricsgraphics, so this may be an issue for scatterD3 instead.
This happens because scatterD3 uses D3.js version 4.x,, while d3heatmap uses version 3.x. If both widgets are in the same page, htmlwidgets loads only the latest D3 version, 4.x. This leaves d3heatmap broken. There are two options: either d3heatmap is upgraded to D3 version 4, or scatterD3 uses a custom bundle of D3 in an own namespace.
Shoot. I think d3 v3 and d3 v4 can actually exist side-by-side, but, because they use the same name "d3"
htmltools/htmlwidgets assumes that they are substitutes. One fix would be to change the name of the latter to d3v4
, but that's something that everyone that bundles d3 v4 would have to standardize on.
Another possibility would be for scatterD3 to "compile in" its copy of d3 v4 using browserify or webpack--it was my understanding that this is how d3 v4 was designed to be used. If that was the case then there would be no separate d3
dependency at all for d3 v4.
I have this same issue (i.e., the d3heatmap image will not render - however the title of the heat map does render) when using both the networkD3 and d3heatmap packages in an R Shiny app.
Are there plans to fix this issue (assuming the problem is due to d3heatmap using an older version of D3.js, whereas other packages are using newer/the most recent version of D3.js)?
Hello, I'm currently working on a flexdashboard in which I would like to include both a d3heatmap and a scatterD3. When d3heatmap is used by itself, it renders just fine; however, when both are present the d3heatmap does not render (regardless of whether the chunk is placed first or last). The same problem occurs in rmarkdown. Minimal reproducible example below, thanks! -- Andrea