Skip to content

100_100_Save_to_Png

FVANCOP edited this page Dec 22, 2014 · 7 revisions

Previous Chapter          Previous Page          Next Page          Next Chapter          Table of content

Save to Png file

In order to help the user to save the chart into a PNG file, several options have been setup.

Contents

savePng

Description: if you set the option savePng to true, the functions that help to save the chart into a png file are activated. When this option is set to true and if none of the associated options are changed, when you click with the right mouse button on the chart, the chart is displayed in a new window and can easely be saved there.

Chart type: all

Value: true or false

Default value: false

Sample: savePng : true

See also:

savePngBackgroundColor

Description: Unless the user has defined a background color for the canvas, there is no background color for the chart. With option savePngBackgroundColor you can define a background color for the saved chart.

Chart type: all

Value: any valid color

Default value: “white”

Sample: savePngBackgroundColor : “yellow”

See also:

savePngFunction

Description: the chart will be saved when the user perform a specific action on the chart. Specify the action with option savePngFunction

Chart type: all

Value: any valid mouse movement (see chapter about mouse movement)

Default value: "mousedown right"

Sample:

See also:

savePngOutput

Description: When the user perform the action for saving the chart, different effect are possible :

  •     The chart can be displayed in a new window and from there, you can save it.
  •     The chart can be displayed in the current window and from there, you can save it;
  •     The chart can be immediately saved to a png file.

Remark : None of those three effect is running correctly on all browsers; The “NewWindow” is the less bad solution…

Chart type: all

Value: "NewWindow", "CurrentWindow", "Save"

Default value: “NewWindow”

See also:

savePngName

Description: If you use savePngOutput: "Save" you can also specify a file name.

Chart type: all

Value: any string (without ".png")

Default value: "canvas"

See also:

Previous Chapter          Previous Page          Next Page          Next Chapter          Top of Page