Comments (40)
@vbakella thanks for using and testing the package! I'll try to reproduce here on my end and try to fix. If you should find some other clues as to why this is happening, let me know here.
from diagrammer.
shiny is difficult with mermaid
, but I think I have a working version in an experimental branch fix/mermaid-shiny
. If possible, @rich-iannone and @vbakella, could you test?
devtools::install_github("timelyportfolio/DiagrammeR@fix/mermaid-shiny")
I have noticed it doesn't work well with RStudio Viewer, but worked well in Chrome.
If ok, I'll submit pull. Thanks.
from diagrammer.
Going to test it now. Thanks!
from diagrammer.
I seem to get 'parse error' each time. I believe I put in a valid mermaid diagram spec each time. It should work just with the graph definition ("graph LR").
from diagrammer.
That is the issue I mentioned with RStudio Viewer. Can you try in the browser?
from diagrammer.
I did try it in Safari (in screenshot). I'll also try in Firefox.
from diagrammer.
Ok, I see it now. Maybe it only works with Chrome then. hmmm...
from diagrammer.
Maybe. Same problem with latest Firefox on Mac.
from diagrammer.
Well, it does need a ;
or line break, so does graph LR;
give you no error and a blank space?
from diagrammer.
Pretty sure I exhausted all possibilities. I'll try again shortly with a ;
and a space.
from diagrammer.
ok, I think I see the problem. Let me play a bit.
from diagrammer.
Does a non-shiny static mermaid
work? If it is what I think it is, then it should not.
from diagrammer.
I'll check that out once I get into the office. About 20 min.
Sent from my iPhone
On Jan 26, 2015, at 7:22 AM, timelyportfolio [email protected] wrote:
Does a non-shiny static mermaid work? If it is what I think it is, then it should not.
—
Reply to this email directly or view it on GitHub.
from diagrammer.
Okay. Tested it out! It's fine with the space following the ;
. Sorry about that.
from diagrammer.
Will you try again with my newest push? I think it will be more robust. Still does not work in RStudio viewer though :(
devtools::install_github("timelyportfolio/DiagrammeR@fix/mermaid-shiny")
from diagrammer.
I'm sorry but I just went to the field so I'm away from that test computer. Might have to do this by the end of the day.
Sent from my iPhone
On Jan 26, 2015, at 8:48 AM, timelyportfolio [email protected] wrote:
Will you try again with my newest push? I think it will be more robust. Still does not work in RStudio viewer though :(
devtools::install_github("timelyportfolio/DiagrammeR@fix/mermaid-shiny")
—
Reply to this email directly or view it on GitHub.
from diagrammer.
Hi,
I installed the fix mentioned above. I am able to generate Mermaid and GraphViz plots as per the examples. However, a Shiny program with a single DiagrammeR call is not working - gives a parser error.
Here is the code I tried:
library(shiny)
library(DiagrammeR)
ui = shinyUI(fluidPage(
textInput('spec', 'Diagram Spec', value = ""),
DiagrammeROutput('diagram')
))
server = function(input, output){
output$diagram <- renderDiagrammeR(DiagrammeR(
input$spec
))
}
shinyApp(ui = ui, server = server)
from diagrammer.
Try separating by ; so
graph LR; a;
from diagrammer.
Okay, back to the test computer. Tried this:
graph LR; F-->R
Got this:
parse error with graph LR; F-->R
s.rules is undefined
from diagrammer.
Well unexpected but not surprising. So the old behavior from this morning did work on all your browsers? I'll revert back to that if so.
from diagrammer.
The earlier build was okay. Perhaps revert to that and continue a bit later with testing of the Shiny app. Also, @jjallaire, is the new Preview release of RStudio the one that supports syntax highlighting of Graphviz and mermaid graphs?
from diagrammer.
No the preview doesn't yet support syntax highlighting, for that you need the daily build which you can get from here: http://www.rstudio.org/download/daily/desktop/
from diagrammer.
Still a problem for me. Get a DOM exception 12. Tried in both RStudio and in browser.
from diagrammer.
I can't repro this but I'll bet if I get more info on your configuration I
will be able to:
(1) What OS and exact version of RStudio are you running?
(2) Could you share the source code of your example from above?
On Wed, Jan 28, 2015 at 12:05 AM, Richard Iannone [email protected]
wrote:
Still a problem for me. Get a DOM exception 12. Tried in both RStudio and
in browser.[image: dom_exception_12]
https://cloud.githubusercontent.com/assets/5612024/5932705/13168aa2-a668-11e4-9063-ac129d6bb442.png—
Reply to this email directly or view it on GitHub
#51 (comment)
.
from diagrammer.
What about without shiny? Wonder why it worked before. Hmmmm...
from diagrammer.
I tried it without Shiny (in RStudio and in R Markdown). I could have
constructed a Shiny example but wanted to make sure I was using the exact
code that Rich was before proceeding.
On Wed, Jan 28, 2015 at 7:07 AM, timelyportfolio [email protected]
wrote:
What about without shiny? Wonder why it worked before. Hmmmm...
—
Reply to this email directly or view it on GitHub
#51 (comment)
.
from diagrammer.
Let's wait to hear from @rich-iannone. Works for me static with RStudio Viewer, Chrome, and Firefox. Works for me shiny with Chrome and Firefox and not on RStudio (0.99.179). I'll try the nightly build to see if it fixes.
from diagrammer.
I'll be able to test this shortly...
from diagrammer.
Does not work for me in shiny context with newest RStudio viewer. @jjallaire, if you want to try on yours with shiny, the code above allows a quick test:
library(shiny)
ui = shinyUI(fluidPage(
textInput('spec', 'Diagram Spec', value = ""),
DiagrammeROutput('diagram'),
DiagrammeROutput('diagram2')
))
server = function(input, output){
output$diagram <- renderDiagrammeR(DiagrammeR(
input$spec
))
output$diagram2 <- renderDiagrammeR(DiagrammeR(
input$spec
))
}
shinyApp(ui = ui, server = server)
from diagrammer.
Yesterday's testing that didn't work for me used the following:
Jan 26 build of RStudio for Mac
Latest version of Safari/Mac
from diagrammer.
What about static?
from diagrammer.
Just to be sure I'm testing this correctly, how do you run a static test?
from diagrammer.
non-shiny, so mermaid(...)
from diagrammer.
Ah, of course :) (morning time). I'll test again shortly once I get onto my train.
from diagrammer.
Okay was able to test.
— static: works
— Shiny in RStudio: doesn't work
— Shiny in Safari 8.0.2 (10600.3.5) Mac: doesn't work
— Shiny in Firefox 35.0 Mac: works
from diagrammer.
Here is the screen grab of it working in Firefox:
from diagrammer.
Ok, that is helpful, so we have contained it. I thought it was caused by the css changes, but actually it is happening somewhere else (in mermaid.init it seems). I'll report back.
from diagrammer.
It seems the error comes due to a security constraint with the websocket. Don't have the skillset to fix this, so @rich-iannone up to you how we proceed unless @jjallaire has other ideas.
from diagrammer.
Ah, good investigative work. I think we should simply proceed and state the compatibility amongst browsers in a table and update that as we go on.
@jjallaire, what do you think?
from diagrammer.
Yes, that sounds fine to me!
On Wed, Jan 28, 2015 at 11:07 AM, Richard Iannone [email protected]
wrote:
Ah, good investigative work. I think we should simply proceed and state
the compatibility amongst browsers in a table and update that as we go on.
@jjallaire https://github.com/jjallaire, what do you think?—
Reply to this email directly or view it on GitHub
#51 (comment)
.
from diagrammer.
Related Issues (20)
- 'overlap = portho' causes error on to many clusters
- Render mermaid code HOT 1
- Exporting a graph to svg/png silently does nothing if DiagrammeRsvg isn't installed HOT 1
- Mermaid version used in DiagrammeR HOT 1
- .mmd file read and preview HOT 1
- Avoid nodes overlapping
- Integrate r variables in Mermaid Graph HOT 1
- github website link leads to spam HOT 1
- influenceR orphaned dependency HOT 4
- Release DiagrammeR 1.0.10
- export_graph layout
- render_graph layout
- `generate_dot()` uses single quotes instead of double quotes HOT 1
- as_svg produces `object 'display' not found' error
- Are the new features of gantt charts mermaid.js updated? HOT 2
- Error in render_graph HOT 1
- Test relies on specific output from sample_islands() for given seed HOT 4
- mermaid sequenceDiagram not working? HOT 2
- Documentation checks
- Quarto 1.4 - Cannot render `grVIz()` chart into HTML
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diagrammer.