rich-iannone / DiagrammeR

Graph and network visualization using tabular data in R
https://rich-iannone.github.io/DiagrammeR/
Other
1.69k stars 248 forks source link

Issue with rendering in shinyapps.io #196

Open bguiastr opened 7 years ago

bguiastr commented 7 years ago

Hi,

I created a way to dynamically visualize differential equations systems thanks to DiagrammeR (CRAN v0.8.4), you can see it under the dQMD tab on this shiny app

While the app was working perfectly on my mac but once uploaded to shinyapps.io, the color gradients were not properly rendered. I could see this issue with safari (rendered black nodes), internet explorer and firefox (both rendered white nodes) but not chrome.

rendering_issue

I have created a minimal reproducible example and uploaded the app on shinyapps for testing:

library(shiny)
library(DiagrammeR)

shinyApp(
  ui = shinyUI(fluidPage(
    h1('DiagrammeR example'),
    grVizOutput('diagram')
  )), 

  server = function(input, output) {
    output$diagram <- renderGrViz(
      grViz("digraph test {
node [style='filled', gradientangle=90, shape='square']
A [color='orange:blue']
B [color='green:red']
A -> B
}")) 
  })

This issue was originally posted on the shinyapps.io forum (here) but the problems apparently comes from DiagrammeR and not shinyapps.io, reason why I am bringing this here.

Thanks in advance.

rich-iannone commented 7 years ago

@guiastrennec had a look at the example on shinyapps and I'm seeing the same thing in Safari. I'll dig into this and see if anything can be done to get the gradients working properly.

bguiastr commented 7 years ago

Thank you very much for looking into this!

rich-iannone commented 7 years ago

@guiastrennec if this is still a problem, maybe check this again with the newest build. The underlying Graphviz JS library has been updated. Just want to see if that results in less gradient problems.

bguiastr commented 7 years ago

@rich-iannone unfortunately I still get the same issue with the gradient in Safari under the newest build (but it still works under Chrome).

You can take a look at the updated shinyapp here