You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like even without explicitly setting the path when you search for it in the tmp folders and navigate to the index.html file the results are the same as the raw export mechanism.
However when you use use the path set to the index.html and launch the browseURL it works perfectly by setting up a localhost {same way it works without defining the path in the function where it the output renders but not in an exportable format.
library(trelliscopejs)
library(highcharter)
library(tidyverse)
tbl_mpg <-
mpg %>%
nest(data = !one_of(c("manufacturer", "class"))) %>%
mutate(cogs = map_cog(
data,
~ tibble(
mean_city_mpg = cog(mean(.$cty), desc = "Mean city mpg"),
mean_hwy_mpg = cog(mean(.$hwy), desc = "Mean highway mpg"),
most_common_drv = cog(tail(names(table(
.$drv
)), 1), desc = "Most common drive type")
)
))
df <- tbl_mpg %>%
mutate(panel = map_plot(data, function(x) {
hchart(x, type = "scatter", hcaes(x = "cty", y = "hwy", group = "drv"))
}))
viz_no_path <- df %>%
trelliscope(
name = "city_vs_highway_mpg",
nrow = 1,
ncol = 2,
jsonp = T
)
viz_no_path ## works in viewer
temp_path <- attr(viz_no_path, "trelliscope_pars")$www_dir
browseURL(temp_path) ## opens static trelliscope index.html file and doesn't work
file.path(path$www_dir, "index.html") %>% browseURL() ## does work!
Any idea if there is a way to export the localhost rendered version that does work?
Ryan,
Appears like there are issue creating exportable trelliscopes with highcharter objects.
It works perfectly fine when you aren't exporting the trelliscope.
Here is a quick repro example:
The text was updated successfully, but these errors were encountered: