Skip to main content
Skip table of contents

sw2-chart-export-options.js

Location<tomcat_home>\webapps\webapi\scripts\sw2-charts\sw2-chart-export-options.js

This file defines some of the options for configuring PDF and PNG downloads from Graph View.

It is not necessary to restart SuperWEB2 to apply changes to these configuration settings. Any changes you make will be applied immediately.

General Settings

SettingDescription
downloadid

The filename of the downloaded PDF or PNG (without the file extension).

  • For example:

    CODE
    "downloadid": "SuperWEB2-Graph",
  • Set this to null if you want SuperWEB2 to automatically generate the filename:

    CODE
    "downloadid": null,
  • You can use the keyword $databaseDisplayName to include the current dataset name in the filename. For example:

    CODE
    "downloadid": "$databaseDisplayName-Graph",
chartcredittext

Text to display at the bottom of the chart, in both PNG and PDF downloads.

  • For example:

    CODE
    "chartcredittext": "Chart generated using SuperWEB2",
  • Set this to null to use the data source text from the current dataset:

    JS
    "chartcredittext": null,
  • Set this to an empty string if you do not want to display any text:

    JS
    "chartcredittext": "",
  • You can use the keyword $databaseDisplayName to include the current dataset name in the text. For example:

    CODE
    "chartcredittext": "Data Source: $databaseDisplayName",

The maximum number of characters permitted in the credit text is 256.

chartcreditcolour

The colour to use for the chart credit text displayed at the bottom of the chart. Specify the colour as a HEX value with an initial # character.

For example, the following configuration sets the credit text to black:

CODE
"chartcreditcolour": "#000000",


PDF Settings

See Branding PDF Downloads for more details about customising PDF downloads from SuperWEB2.

SettingDescription
chartimgsizex

Width of the Map form field in the PDF template, in inches. This needs to be specified so that SuperWEB2 can generate the graph image to include in the PDF.

Do not change this setting unless you have created your own custom PDF template. See Branding PDF Downloads for details on how to obtain this information when you create your template in Adobe Acrobat.

chartimgsizey

Height of the Map form field in the PDF template, in inches. This needs to be specified so that SuperWEB2 can generate the graph image to include in the PDF.

Do not change this setting unless you have created your own custom PDF template. See Branding PDF Downloads for details on how to obtain this information when you create your template in Adobe Acrobat.

dpi
The dots per inch to use when rendering the chart image in the PDF. The default is 72 (72dpi is standard print resolution).
title

The Title Document Property in the generated PDF. You can use the keyword $databaseDisplayName to include the current dataset name.

PDF document properties can be viewed when the PDF is opened in Adobe Reader or Acrobat. Right-click the document and select Document Properties.

author
The Author Document Property in the generated PDF. You can use the keyword $databaseDisplayName to include the current dataset name.
subject
The Subject Document Property in the generated PDF. Set this to null to use the chart title. You can use the keyword $databaseDisplayName to include the current dataset name.
keywords
The Keywords in the Document Properties in the generated PDF. You can use the keyword $databaseDisplayName to include the current dataset name.
additionalcredittext
A copyright statement or other text to be displayed at the bottom of the PDF.

PNG Settings

See Branding PNG Downloads for more details about customising PNG downloads from SuperWEB2.

SettingDescription
chartimgsizex
The width of the PNG download, in pixels. If you set this to null it defaults to the current width of the displayed graph.
chartimgsizey
The height of the PNG download, in pixels. If you set this to null it defaults to the current height of the displayed graph.
additionalcredittext
A copyright statement or other text to be displayed at the bottom of the image.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.