%%{init: {
"theme": "base",
"themeVariables": {
"fontFamily": "Lato, system-ui, sans-serif",
"background": "#f8f8f8",
"primaryColor": "#1a1a1a",
"primaryTextColor": "#f8f8f8",
"primaryBorderColor": "#1a1a1a",
"lineColor": "#2d2d2d",
"actorBkg": "#1a1a1a",
"actorBorder": "#1a1a1a",
"actorTextColor": "#f8f8f8",
"actorLineColor": "#2d2d2d",
"signalColor": "#2d2d2d",
"signalTextColor": "#2d2d2d",
"noteBkgColor": "#ffffff",
"noteTextColor": "#2d2d2d",
"noteBorderColor": "#4a6cf7",
"sequenceNumberColor": "#f8f8f8"
}
}}%%
sequenceDiagram
autonumber
participant N as Browser
participant S as R Server (Shiny)
Note over N,S: Persistent WebSocket
Note over S: Dedicated R session
N->>+S: input$bins = X
Note right of S: invalidates dependencies<br/>recomputes what's needed
S-->>-N: output$plot = <PNG>
Note over N: Shiny updates the element<br/>bound to output$plot