Skip to content
  1. API
  2. Types

ImageExportOptions

Type: object

Properties

  • background(optional) Color Color of the background on the output image

  • badges(optional) boolean[=true] Whether or not to export badges

  • clip(optional) boolean[=false] If true, export the current view rather than the whole graph

  • download(optional) boolean[=true] If true, the user will be prompted a modal window so he can download the exported graph.

  • filename(optional) string[="graph.png"] If download is true, the default name for the downloaded file.

  • filter(optional) "visible"|"all"[="visible"] Indicates what elements to export.

  • height(optional) number If not specified, the height of the canvas will be used.

  • imageCrossOrigin(optional) string In case node or badge images are coming from a CDN, set this to 'anonymous' to avoid security errors on export.

  • imageWatermark(optional) object

    • alpha(optional) string[=0.65] Transparency of the watermark, from 0 to 1 (0 = fully transparent)
    • angle(optional) string[=0] Angle of the watermark (in degrees)
    • height(optional) string If not specified, the original width of the image will be used.
    • repeat(optional) string[=false] Indicates if the watermark should be repeated over the image
    • space(optional) string[=50] If repeating the watermark, space in pixels between the repetitions
    • url(optional) string Url of the image to use as watermark
    • width(optional) string If not specified, the original width of the image will be used.
    • x(optional) string X coordinate of the center of the watermark
    • y(optional) string Y coordinate of the center of the watermark
  • images(optional) boolean[=true] Whether or not to export images

  • layers (optional) boolean[=true] Whether to export visible layers or not. Defaults to true

  • legend(optional) boolean|LegendOptions If unspecified and the legend is enabled, it will be exported with the current options. If unspecified and the legend is not enabled, it will not be exported. If false, the legend will not be exported no matter what. If true, the legend will be exported with the default options, whether it's enabled or not. If an object is specified, the legend will be exported with the specified options, whether it's enabled or not.

  • margin(optional) number[=10] Blank space around the graph (in pixels)

  • pixelRatio(optional) number Image resolution. Defaults to your screen resolution, so on high-resolution screens the exported image will be scaled up to maintain the resolution.

  • preventOverlap(optional) boolean[=true] If true, hide texts which overlap, else display labels which are already present on screen

  • textWatermark(optional) object

    • alpha(optional) number[=0.65] Transparency of the watermark, from 0 to 1 (0 = fully transparent)
    • angle(optional) number[=0] Angle of the watermark (in degrees)
    • content(optional) string Content of the text watermark
    • fontColor(optional) Color[="red"] Color to use to display the text watermark
    • fontFamily(optional) string[="Arial"] Font used to display the text watermark
    • fontSize(optional) number[=48] Size of the text watermark
    • fontStyle(optional) "bold"|"italic" Style to use to display the text watermark
    • repeat(optional) boolean[=false] Indicates if the watermark should be repeated over the image
    • space(optional) number[=50] If repeating the watermark, space in pixels between the repetitions
    • x(optional) number X coordinate of the center of the watermark
    • y(optional) number Y coordinate of the center of the watermark
  • texts(optional) boolean[=true] Whether or not to export texts

  • width(optional) number If not specified, the width of the canvas will be used.