2016-03-28 58 views
0

有在制图人鱼序列图线R.上shinyapps.io托管代码时在制图顺序图没有箭头

第一只复制的例子在本地运行,也当我得到这个结果没有箭头代码在这里:http://rich-iannone.github.io/DiagrammeR/mermaid.html#sequence-diagrams进入RStudio并运行显示没有箭头。请注意链接图中的箭头。

所以我创建了下面的闪亮表现,并将其推到Shinyapps这里:https://mattbrigida.shinyapps.io/seq_ex/seq_diag_example.Rmd#2

--- 
title: "Sequence Diagram Example Presentation" 
author: "Matt Brigida" 
affiliation: 
date: "03/10/2016" 
output: ioslides_presentation 
runtime: shiny 
smaller: true 
--- 

## 

```{r, echo=FALSE, message=FALSE, warning=FALSE, error=FALSE} 
library(shiny) 
library(DiagrammeR) 

ui = shinyUI(fluidPage(
titlePanel("No Arrows on Shinyapps"), 

fluidRow(
    column(12, numericInput("test", "Does Nothing", value = 1)) 
    ), 
fluidRow(
    column(12, 
      DiagrammeROutput('diagram2', width = "100%") 
      ) 
    ) 
    ) 
      ) 
server = function(input, output){ 

    output$diagram2 <- renderDiagrammeR({ 
     mermaid(" 
sequenceDiagram 
X->>Y: No Arrows when run locally 
Y->>X: No arrows when on Shinyapps 
X-->>X: why?? 
") 
    }) 
} 
shinyApp(ui = ui, server = server) 
``` 

没有箭也存在,所以这不能成为我的本地设置。

这个问题可能涉及:https://github.com/knsv/mermaid/issues/209与建议的解决方案:https://github.com/knsv/mermaid/blob/fcb2af780dac7f42d8e467948f311177b54a62d2/src/diagrams/sequenceDiagram/sequenceRenderer.js#L231-L235

但我不知道如何将这种潜在的修复到我闪亮的应用呈现箭头?有任何想法吗?

本地运行:

  • 制图版0.8.2
  • [R 3.2.3
  • x86_64的GNU/Linux的
  • 铬 49.0.2623.87

回答

0

这个问题已经从GitHub提供的DiagrammeR 0.8.3版中修复。加入

devtools::install_github('rich-iannone/DiagrammeR') 

在应用程序中,所以它从GitHub而不是CRAN拉库,解决了这个问题。