ImageExportUIOptions
Options for an ImageExportUI
Extends
Properties
dimensions?
optionaldimensions:object[]
Optional list of dimensions
height?
optionalheight:number
width?
optionalwidth:number
downloadButtonLabel?
optionaldownloadButtonLabel:string
Optional label to use on the download button. Defaults to "Download".
filename?
optionalfilename:string
Optional filename to use - defaults to visuallyjs-export. You do not need to provide the extension.
height?
optionalheight:number
Optional height for the export. The exported image's aspect ratio will always be honoured so if you provide both this and width, this will be ignored. If you don't provide this the natural height of the underlying SVG will be used.
Inherited from
margins?
optionalmargins:PointXY
Optional margin to set around the content. Defaults to 50px in x and y
Inherited from
onDimensionsChanged()?
optionalonDimensionsChanged: (width,height,url) =>any
Optional function to invoke when the user changes the selected dimensions.
Parameters
width
number
height
number
url
string
Returns
any
onShow()?
optionalonShow: (el,width,height,url) =>any
Optional function to invoke after the UI has been displayed.
Parameters
el
Element
width
number
height
number
url
string
Returns
any
quality?
optionalquality:number
Optional quality of the resulting image - only used for jpeg. Defaults to 1.0.
Inherited from
showGrid?
optionalshowGrid:boolean
Whether or not to show the grid in the export (the UI itself has to be showing a grid for the export to have one). Defaults to true.
Inherited from
style?
optionalstyle:string|Record<string,any>
Optional style to set in a style element in the SVG header. You can provide the CSS for the style element as a string, or you can provide a JS object.
Inherited from
type?
optionaltype:string
Content type for the export. Defaults to image/png. Most modern browsers also support image/jpeg.
Inherited from
width?
optionalwidth:number
Optional width for the export. The exported image's aspect ratio will always be honoured so if you provide both this and height, height will be ignored. If you don't provide this the natural width of the underlying SVG will be used.