Skip to content

Function: downloadImage() ​

ts
function downloadImage(target, options?, chartOptions?): Promise<string>;

Plotly's downloadImage: toImage and save the file as <filename>.<format> (default newplot.png). Resolves to the file name.

Parameters ​

ParameterType
target| HTMLElement | FigureInput<object, LayoutInput>
optionsDownloadImageOptions
chartOptions?ChartOptions

Returns ​

Promise<string>

Released under the MIT License.