namespace anychart.exports Improve this Doc
The anychart.exports namespace contains export functions.
Functions Overview
clientside() | Client side export configuration. |
facebook() | Facebook sharing settings |
filename() | Setter and getter for the file name for exported files. |
image() | Getter for dimensions for exported images and PDFs. |
linkedin() | LinkedIn sharing settings |
pinterest() | Pinterest sharing settings |
server() | Setter for an address export server script, which is used to export to an image or PDF. |
twitter() | Twitter sharing settings |
Typedefs Overview
anychart.exports.ClientsideConfiguration | Type definition of client side configuration. |
Functions Description
clientside
Getter for the client side exporting configuration.
Returns:
anychart.exports.ClientsideConfiguration - Client side export configuration.Setter for the client side exporting configuration.
Detailed description
Client side configuration object has 3 fields.
Path is the base URL to the location where dependencies needed for client side export to work are placed. These dependencies are: Enabled sets whether client side should be used.
Fallback sets whether export should use export server if client side export fails.
Path is the base URL to the location where dependencies needed for client side export to work are placed. These dependencies are: Enabled sets whether client side should be used.
Fallback sets whether export should use export server if client side export fails.
Params:
Name | Type | Description |
---|---|---|
configuration | anychart.exports.ClientsideConfiguration | New image or PDF width. Or object with options. |
Returns:
anychart.core.utils.Exports - Itself for method chaining.Try it:
Getter for Facebook sharing settings.
Returns:
Object - Sharing settings. See listing
var settings = anychart.exports.facebook();
Setter for Facebook sharing settings.
Params:
Name | Type | Description |
---|---|---|
captionOrOptions | string | Object | Caption for the main link or object with options. |
link | string | The URL is attached to the publication. |
name | string | The title for the attached link. |
description | string | Description for the attached link. |
width | string | Image width. |
height | string | Image height. |
appId | string | Facebook application id. |
Returns:
Object - Sharing settings.Try it:
filename
Setter and getter for the file name for exported files.
Params:
Name | Type | Description |
---|---|---|
fileName | string | New file name. |
Returns:
string - Returns file name.Try it:
image
Getter for dimensions for exported images and PDFs.
Returns:
Object - The image dimensions. See listing
var dimensions = anychart.exports.image();
Setter for dimensions for exported images and PDFs.
Params:
Name | Type | Description |
---|---|---|
widthOrOptions | string | Object | New image or PDF width. Or object with options. |
height | string | New image or PDF height. |
Returns:
Object - The image dimensions.Try it:
Getter for LinkedIn sharing settings.
Returns:
Object - Sharing settings. See listing
var settings = anychart.exports.linkedin();
Setter for LinkedIn sharing settings.
Params:
Name | Type | Description |
---|---|---|
captionOrOptions | string | Object | Caption for publication or object with options. |
description | string | Description. |
width | string | Image width. |
height | string | Image height. |
Returns:
Object - Sharing settings.Try it:
Getter for Pinterest sharing settings.
Returns:
Object - Sharing settings. See listing
var settings = anychart.exports.pinterest();
Setter for Pinterest sharing settings.
Params:
Name | Type | Description |
---|---|---|
linkOrOptions | string | Object | Attached link or object with options. |
description | string | Description. |
width | string | Image width. |
height | string | Image height. |
Returns:
Object - Sharing settings.Try it:
server
Setter for an address export server script, which is used to export to an image or PDF.
See:anychart.graphics.vector.Stage#saveAsPdf
anychart.graphics.vector.Stage#saveAsPng
anychart.graphics.vector.Stage#saveAsJpg
anychart.graphics.vector.Stage#saveAsSvg
See:
Detailed description
Note: If it doesn't set the address of the export server, you will get the current address.
Params:
Name | Type | Description |
---|---|---|
address | string | Export server script URL. |
Returns:
string - Export server script URL.Try it:
Getter for Twitter sharing settings.
Returns:
Object - Sharing settings. See listing
var settings = anychart.exports.twitter();
Setter for Twitter sharing settings.
Params:
Name | Type | Description |
---|---|---|
urlOrOptions | string | Object | Twitter sharing application export server URL or object with options. |
width | string | Image width. |
height | string | Image height. |
Returns:
Object - Sharing settings.Try it: