# amCharts Export
Version: 1.4.43
## Description
This plugin adds export capabilities to all amCharts products - charts and maps.
It allows annotating and exporting chart or related data to various bitmap,
vector, document or data formats, such as PNG, JPG, PDF, SVG, JSON, XLSX and
many more.
## Important notice
Please note that due to security measures implemented in modern browsers, some
or all export options might not work if the web page is loaded locally (via
file:///) or contain images loaded from different host than the web page itself.
## Usage
### 1) Include the minified version of file of this plugin as well as the
bundled CSS file. I.e.:
```
<script src="amcharts/plugins/export/export.min.js"></script>
<link type="text/css" href="amcharts/plugins/export/export.css" rel="stylesheet">
```
Or if you'd rather use amCharts CDN:
```
<script src="//cdn.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link type="text/css" href="//cdn.amcharts.com/lib/3/plugins/export/export.css" rel="stylesheet">
```
(this needs to go after all the other amCharts includes)
### 2) Enable `export` with default options:
```
AmCharts.makeChart( "chartdiv", {
...,
"export": {
"enabled": true
}
} );
```
### ... OR set your own custom options:
```
AmCharts.makeChart( "chartdiv", {
...,
"export": {
"enabled": true,
"menu": [ {
"class": "export-main",
"menu": [ {
"label": "Download",
"menu": [ "PNG", "JPG", "CSV" ]
}, {
"label": "Annotate",
"action": "draw",
"menu": [ {
"class": "export-drawing",
"menu": [ "PNG", "JPG" ]
} ]
} ]
} ]
}
} );
```
## Loading external libraries needed for operation of this plugin
The plugin relies on a number of different libraries, to export images, draw
annotations or generate download files.
Those libraries need to be loaded for the plugin to work properly.
There are two ways to load them. Choose the one that is right:
### 1) Automatic (preferred)
All libraries required for plugin operation are included withing plugins */libs*
subdirectory.
The plugin will automatically try to look in chart's [`path`](http://docs.amcharts.com/3/javascriptcharts/AmSerialChart#path)
property. If your plugin files are located within plugins folder under amcharts
(as is the case with the default distributions), you don't need to do anything -
the libraries will load on-demand.
If you are using relative url, note that it is relative to the web page you are
displaying your chart on, not the export.js library.
In case you've moved the libs folder you need to tell the plugin where it is
`"libs": { "path": "../libs/" }`
### 2) Manual
You can also load all those JavaScript libraries by `<script>` tags. Since
loading of libraries is on by default you will need to turn it off by setting
`"libs": { "autoLoad": false }`
Here is a full list of the files that need to be loaded for each operation:
File | Located in | Required for
---- | ---------- | ------------
fabric.min.js | libs/fabric.js/ | Any export operation
FileSaver.js | libs/FileSaver.js/ | Used to offer download files
pdfmake.min.js | libs/pdfmake/ | Export to PDF format
vfs_fonts.js | libs/pdfmake/ | Export to PDF format
jszip.js | libs/jszip/ | Export to XLSX format
xlsx.js | libs/xlsx/ | Export to XLSX format
## Complete list of available export settings
Property | Default | Description
-------- | ------- | -----------
backgroundColor | #FFFFFF | RGB code of the color for the background of the exported image
enabled | true | Enables or disables export functionality
divId | | ID or a reference to div object in case you want the menu in a separate container.
fabric | {} | Overwrites the default drawing settings (fabricJS library)
fallback | {} | Holds the messages to guide the user to copy the generated output; `false` will disable the fallback feature
fileName | amCharts | A file name to use for generated export files (an extension will be appended to it based on the export format)
legend | {} | Places the legend in case it is within an external container ([skip to chapter](#adding-external-legend))
libs | | 3rd party required library settings (see the above section)
menu | [] | A list of menu or submenu items (see the next chapter for details)
pdfMake | {} | Overwrites the default settings for PDF export (pdfMake library)
position | top-right | A position of export icon. Possible values: "top-left", "top-right" (default), "bottom-left", "bottom-right"
removeImages | true | If true export checks for and removes "tainted" images that area lodead from different domains
delay | | General setting to delay the capturing of the chart ([skip to chapter](#delay-the-capturing-before-export))
exportFields | [] | If set, only fields in this array will be exported ( data export only )
exportTitles | false | Exchanges the data field names with it's dedicated title ( data export only )
columnNames | {} | An object of key/value pairs to use as column names when exporting to data formats. `exportTitles` needs to be set for this to work as well.
exportSelection | false | Exports the current data selection only ( data export only )
dataDateFormat | | Format to convert date strings to date objects, uses by default charts dataDateFormat ( data export only )
dateFormat | YYYY-MM-DD | Formats the category field in given date format ( data export only )
keyListener | false | If true it observes the pressed keys to undo/redo the annotations
fileListener | false | If true it observes the drag and drop feature and loads the dropped image file into the annotation
drawing | {} | Object which holds all possible settings for the annotation mode ([skip to chapter](#annotation-settings))
overflow | true | Flag to overwrite the css attribute 'overflow' of the chart container to avoid cropping the menu on small container
border | {} | An object of key/value pairs to define the overlaying border
processData | | A function which can be used to change the dataProvider when exporting to CSV, XLSX, or JSON
pageOrigin | true | A flag to show / hide the origin of the generated PDF ( pdf export only )
forceRemoveImages | false | If true export removes all images
## Configuring export menu
Plugin includes a way to completely control what is displayed on export menu.
You can set up menus, sub-menus, down to any level. You can even add custom
items there that execute your arbitrary code on click. It's so configurable
it makes us sick with power ;)
The top-level menu is configured via `menu` property under `export`. It should
always be an array, even if you have a single item in it.
The array items could be either objects or format codes. Objects will allow you
to specify labels, action, icon, child items and even custom code to be executed
on click.
Simple format codes will assume you need an export to that format.
### Simple menu setup
Here's a sample of the simple menu setup that allows export to PNG, JPG and CSV:
```
"export": {
"enabled": true,
"menu": [ {
"class": "export-main",
"menu": [ "PNG", "JPG", "CSV" ]
} ]
}
```
The above will display a menu out of three options when you hover on export
icon:
* PNG
* JPG
* CSV
When clicked the plugin will trigger export to a respective format.
If that is all you need, you're all set.
Please note that we have wrapped out menu into another menu item, so that only
the icon is displayed until we roll over the icon. This means that technically
we have a two-level hierarchical menu.
If we opmitted that first step, the chart would simply display a format list
right there on the chart.
### Advanced menu setup
However, you can do so much more with the menu.
Let's add more formats and organize image and data formats int
没有合适的资源?快使用搜索试试~ 我知道了~
【WordPress插件】2022年最新版完整功能demo+插件v1.2.1.zip
共308个文件
js:80个
png:76个
svg:55个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 66 浏览量
2022-04-01
02:39:33
上传
评论
收藏 2.92MB ZIP 举报
温馨提示
"【WordPress插件】2022年最新版完整功能demo+插件v1.2.1 Real-time FOREX Charts | WordPress Plugin 实时外汇图表| WordPress插件" ---------- 泰森云每天更新发布最新WordPress主题、HTML主题、WordPress插件、shopify主题、opencart主题、PHP项目源码、安卓项目源码、ios项目源码,更有超10000个资源可供选择,如有需要请站内联系。
资源推荐
资源详情
资源评论
收起资源包目录
【WordPress插件】2022年最新版完整功能demo+插件v1.2.1.zip (308个子文件)
export.css 34KB
spectrum.css 15KB
realtime-forex-charts.css 2KB
style.css 1014B
admin.css 179B
MSFT.csv 183KB
TXN.csv 182KB
MSFT_events.csv 3KB
serial.csv 381B
pie.csv 131B
dragIconBlack.gif 122B
dragIcon.gif 122B
pencilIconH.gif 113B
dragIconH.gif 111B
dragIconHBlack.gif 111B
eraserIconH.gif 107B
pencilIcon.gif 97B
xIcon.gif 93B
eraserIcon.gif 91B
xIconH.gif 79B
stock_csv_progressbar.html 10KB
stock_csv_data_and_events.html 8KB
gantt.html 7KB
gantt.html 6KB
advanced.html 6KB
stock.html 6KB
map.html 6KB
serial1.html 5KB
stock.html 5KB
serial1.html 5KB
map.html 5KB
index.html 4KB
xy.html 4KB
serial3.html 3KB
serial3.html 3KB
xy.html 3KB
serial_csv.html 3KB
serial_with_dynamic_graphs.html 3KB
serial2.html 3KB
serial_json.html 3KB
pie3.html 3KB
serial2_json.html 3KB
serial2.html 2KB
pie4.html 2KB
pie2.html 2KB
radar.html 2KB
gantt_json.html 2KB
index.html 2KB
funnel.html 2KB
pie3.html 2KB
gauge.html 2KB
radar.html 2KB
funnel.html 2KB
pie2.html 2KB
pie1.html 2KB
gauge.html 2KB
pie1.html 2KB
map_json_external_function.html 2KB
pie_csv.html 1KB
gauge_json.html 1KB
map_json.html 1KB
pie_json.html 1KB
pattern5.jpg 173KB
pattern3.jpg 160KB
pattern4.jpg 160KB
pattern6.jpg 143KB
pattern2.jpg 114KB
pattern1.jpg 113KB
pattern1r.jpg 111KB
pdfmake.js 1.33MB
fabric.js 746KB
vfs_fonts.js 554KB
xlsx.js 444KB
pdfmake.min.js 412KB
jszip.js 296KB
xlsx.min.js 286KB
fabric.min.js 239KB
amcharts.js 204KB
export.js 116KB
spectrum.js 77KB
jszip.min.js 75KB
amstock.js 57KB
export.min.js 53KB
serial.js 48KB
responsive.js 30KB
realtime-forex-charts.js 21KB
dataloader.js 20KB
responsive.min.js 11KB
realtime-forex-charts.min.js 11KB
FileSaver.js 8KB
patterns.js 7KB
dataloader.min.js 7KB
export.config.advanced.js 7KB
blob.js 6KB
chalk.js 4KB
black.js 4KB
dark.js 4KB
light.js 4KB
FileSaver.min.js 3KB
admin.js 3KB
共 308 条
- 1
- 2
- 3
- 4
资源评论
Lee达森
- 粉丝: 968
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功