1

I would like to create an Mermaid diagram of type erDiagram using DiagrammeR (version 1.0.9). Some simple diagrams types work, but others don't.

library(DiagrammeR)

## Diagram types which work (graph, gantt)
DiagrammeR("
graph LR
    A-->B
    A-->C
")

## Does not work
DiagrammeR("
erDiagram
    CUSTOMER ||--o{ ORDER : places
    ORDER ||--|{ LINE-ITEM : contains
    CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
")

Why do not all types work? Is there a way to still use all Mermaid diagram types with DiagrammeR?

retodomax
  • 434
  • 3
  • 14
  • 1
    Maybe this [question](https://stackoverflow.com/questions/54914507/how-to-create-a-entity-relation-diagram-erd) could help? – Quinten May 04 '23 at 10:48
  • @Quinten Thanks, yes this might be an alternative. Still it is unclear to me why certain diagram types do not work with `DiagrammeR`? – retodomax May 04 '23 at 10:50
  • 1
    I think it is due to the version of mermaid bundled with DiagrammeR, as discussed here: https://github.com/rich-iannone/DiagrammeR/issues/457 – sfcheung May 05 '23 at 02:17
  • @sfcheung Great solution, it works, thanks a lot. If you post the link as an answer I will accept it. – retodomax May 08 '23 at 07:32

0 Answers0