Skip to contents

Exports a widget created by draw() (or any of the draw_* functions) to a static file. Currently supports .svg via Node.js server-side rendering. Requires a node binary on PATH.

Usage

save_drawing(widget, filename, width = 800, height = 600)

Arguments

widget

htmlwidget: A widget returned by draw() or a draw_* function.

filename

Character: Output file path. Extension determines the format.

width

Numeric: Image width in pixels.

height

Numeric: Image height in pixels.

Value

The filename, invisibly.

Details

Interactive features (tooltip formatters, event handlers) are stripped before rendering — static images cannot express them.