
Render a pipeline graph as an interactive React Flow widget
Source:R/render-reactflow.R
render_reactflow.RdProduces a modern, interactive dataflow diagram of a GDAL pipeline using React Flow (xyflow). Steps render as card-style nodes colored by category with their arguments inline; edges carry state-change badges (CRS, geometry type, field count); tee branches render as dashed side flows. Clicking a node opens an inspector panel with the full argument list, the propagated stream state, and a link to the GDAL documentation for that step.
Arguments
- graph
A
gdalviz_graphfrompipeline_graph(), or a pipeline/string/path accepted by it.- direction
Layout direction:
"TB"(default),"LR","BT","RL".- theme
"light"(default) or"dark".- minimap
Show a minimap overview. Defaults to
TRUE.- controls
Show zoom/fit controls. Defaults to
TRUE.- legend
Show the category legend. Defaults to
TRUE.- draggable
Allow nodes to be repositioned by dragging. Defaults to
TRUE.- width, height
Widget dimensions passed to
htmlwidgets::createWidget().- elementId
Optional explicit element id for the widget container.
Details
The JavaScript bundle is built from srcjs/ (see
srcjs/README.md) and shipped with the package, so no node toolchain is
needed at run time.
Examples
if (FALSE) { # \dontrun{
gdalg <- system.file(
"extdata", "pipelines", "tiger_states.gdalg.json",
package = "gdalviz"
)
pipeline_graph(gdalg) |> render_reactflow(theme = "dark")
} # }