networkD3 icon indicating copy to clipboard operation
networkD3 copied to clipboard

resize doesn't work when switching tabs in flexdashboard

Open voxnonecho opened this issue 8 years ago • 4 comments

Same issue as #133 but for radialNetwork() and related to this

voxnonecho avatar Aug 24 '16 14:08 voxnonecho

Sorry for the delay.

Is this still a problem, if so can you provide a simple reproducible example?

christophergandrud avatar Dec 05 '16 10:12 christophergandrud

I think I have a minimal reproducible example of this. Save this as an .Rmd

---
title: "radial in flex dashboard"
author: "CJ Yetman"
output: 
  flexdashboard::flex_dashboard:
    mathjax: null
---

```{r setup, include=FALSE}
library(flexdashboard)
library(networkD3)

URL <- paste0("https://cdn.rawgit.com/christophergandrud/networkD3/master/JSONdata//flare.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
s1 <- radialNetwork(List = Flare, fontSize = 10, opacity = 0.9)
```

Page 1
==================
```{r}
s1
```

Page 2
==================
```{r}
s1
```

then "Knit to flex_dashboard" and the radial plot on Page 2 is zoomed in really far. Is this the behavior you were talking about @voxnonecho? I wouldn't call that "Can't render radialNetwork() in flexdashboard", but based on the other issues you pointed to, that seems like the issue you were talking about.

cjyetman avatar Mar 16 '17 11:03 cjyetman

treeNetwork now supersedes diagonalNetwork, dendroNetwork, and radialNetwork, but this issue still exists. new example...

---
title: "radial in flex dashboard"
author: "CJ Yetman"
output: 
  flexdashboard::flex_dashboard:
    mathjax: null
---

```{r setup, include=FALSE}
library(flexdashboard)
library(networkD3)

URL <- paste0("https://cdn.rawgit.com/christophergandrud/networkD3/master/JSONdata//flare.json")
Flare <- jsonlite::fromJSON(URL, simplifyDataFrame = FALSE)
s1 <- treeNetwork(Flare, direction = 'radial')
```

Page 1
==================
```{r}
s1
```

Page 2
==================
```{r}
s1
```

cjyetman avatar Jun 17 '17 14:06 cjyetman

changed title to better reflect the issue

cjyetman avatar Jun 17 '17 14:06 cjyetman