Skip to content

Interface: ToImageOptions ​

Options of chart.toImage / toImage(el, …) (Plotly's toImage options, plus transparent).

Extended by ​

Properties ​

PropertyModifierTypeDescription
format?readonlyImageFormatImage format. Default 'png'.
height?readonlynumber | nullHeight in CSS px; see width.
imageDataOnly?readonlybooleanResolve to the base64 data without the data:image/…;base64, prefix (Plotly).
scale?readonlynumberPixels per CSS px: the image is width·scale × height·scale pixels. Default 1 (not the screen's device pixel ratio, so exports are the same on every screen).
transparent?readonlybooleanDrop the paper background (the default look's #0a0a0f), and the plot-area background unless the figure sets layout.plot_bgcolor itself, for an image with an alpha channel. Ignored for jpeg, which has none. Default false.
width?readonlynumber | nullWidth of the exported figure in CSS px: the figure is laid out again at this size. Default (also null): the chart's current width (layout.width, else 700 for a figure object).

Released under the MIT License.