Closed jameshenry1995 closed 2 years ago
Hi @jameshenry1995
Can you send a reproducible example to work with? Are you using the latest versions of the packages?
Hey @jbkunst , After many hours of tinkering I've finally managed to reproduce my problem using random data I generated, which perfectly reflects my own data.
Here's my code for the flexdashboard, with all the packages I use in my main dashboard:
library(flexdashboard)
library(tidyverse)
library(DBI)
library(rgeolocate)
library(highcharter)
library(stringr)
library(jsonlite)
library(httr)
library(lubridate)
library(reshape2)
library(scales)
table <- as_tibble(data.frame(id = c(1:200),
value = sample(c(500:1000), 200, replace = T),
variable = sample(c("v1","v2","v3","v4","v5","v6"), 200, replace = T)))
table %>%
hchart("scatter",hcaes(x = id, y = value, group = variable))
cars <- cars %>%
mutate(char = ifelse(speed < 10, "below","above"))
cars %>%
hchart("scatter",hcaes(x = speed, y = dist, group = char))
cars %>%
hchart("scatter",hcaes(x = speed, y = dist, group = char))
`
If you run this you should see that the first plot renders perfectly, and the others just don't appear. Conversely, if you replace my plot with a copy paste of the cars plot, it will render. Here's an image of both cases:
I cannot for the life of me understand what causes the issue. All I changed between the two examples is one plot, but they all work the same way.
Here's the code again without the brackets to make sure you can copy paste:
library(flexdashboard)
library(tidyverse)
library(DBI)
library(rgeolocate)
library(highcharter)
library(stringr)
library(jsonlite)
library(httr)
library(lubridate)
library(reshape2)
library(scales)
table <- as_tibble(data.frame(id = c(1:200),
value = sample(c(500:1000), 200, replace = T),
variable = sample(c("v1","v2","v3","v4","v5","v6"), 200, replace = T)))
table %>%
hchart("scatter",hcaes(x = id, y = value, group = variable))
cars <- cars %>%
mutate(char = ifelse(speed < 10, "below","above"))
cars %>%
hchart("scatter",hcaes(x = speed, y = dist, group = char))
cars %>%
hchart("scatter",hcaes(x = speed, y = dist, group = char))
Hi @jameshenry1995
Test again with the development version. I removed the accesibility module and it worked.
Following the trailing garbage error when loading hcmaps, following the addition of a colon to every map, a suggested fix was to pull the development version.
With this version, flexdashboard does not render charts properly anymore. The first one in the dashboard appears, then all subsequent plots do not.
There's also an issue with the hw_grid() function, which, also following the update, only displays a single plot instead of two.