Arrange independent ECharts widgets in a row-major grid. Each panel keeps its own legend, tooltips, zoom, axes, and custom layers. No linked zoom or legend selection is implied. SVG export includes all panels in one vector file and uses the same layout calculation as the browser.
Usage
draw_panels(
plots,
ncol = 1L,
gap = 12,
padding = 0,
layout = NULL,
width = 900,
height = NULL,
element_id = NULL,
filename = NULL
)Arguments
- plots
List: One or more ECharts widgets from draw_*() functions.
- ncol, gap, padding
See PanelLayout.
- layout
Optional PanelLayout: Complete layout overriding the three convenience settings; do not supply both forms.
- width
Optional Character or Numeric: Total figure width.
- height
Optional Numeric: Total figure height. Unset allocates 360 pixels per row plus padding and gaps.
- element_id
Optional Character: Figure DOM identifier.
- filename
Optional Character: Export the complete figure with
save_drawing().
Details
Child widget widths and heights are replaced by equally sized layout cells. Fixed-aspect and square-cell heatmap grids fit within both cell dimensions. Dendrograms remain aligned with their heatmap. Give panels enough space for their labels and legends. Explicit child themes are kept; automatic themes follow the browser, and resolve to light for SVG export. Padding and gaps use the common child background when all panels agree; mixed-background figures remain transparent. This also applies to SVG export. Nested layouts, Sigma/MapLibre, and child JavaScript hooks are not supported by this initial composition API.