This is a rather weird issue: So I’ve developed a web app using R Shiny including a lot of plotly graphs and now deployed it to shinyapps.io. Everything is fine except that the plotly sankey I include does not render the nodes’ labels on Firefox (tested it on Ubuntu and Windows) on shinyapps io, when I run it locally it works like a charm and shows the labels like it’s supposed to (also on Firefox).
Do you have any idea what the issue might be?
Here is a reproducible example that works fine locally or on a shiny server but not on shinyapps .io (I published it to https://matflow.shinyapps.io/sankey-example/ ).
library(shiny)
library(plotly)
ui <- fluidPage(
plotly::plotlyOutput("sankey")
)
server <- function(input, output) {
output$sankey <- plotly::renderPlotly({
# example from plot ly /r/sankey-diagram/#style-sankey-diagram
p <- plot_ly(
type = "sankey",
orientation = "h",
node = list(
label = c("A1", "A2", "B1", "B2", "C1", "C2"),
color = c("blue", "blue", "blue", "blue", "blue", "blue"),
pad = 15,
thickness = 20,
line = list(
color = "black",
width = 0.5
)
),
link = list(
source = c(0,1,0,2,3,3),
target = c(2,3,3,4,4,5),
value = c(8,4,2,8,4,2)
)
) %>%
layout(
title = "Basic Sankey Diagram",
font = list(
size = 10
)
)
p
})
}
shinyApp(ui = ui, server = server)
Thank you in advance,
Jakob