开发者 | martynasma |
---|---|
更新时间 | 2024年8月29日 14:21 |
PHP版本: | 3.5 及以上 |
WordPress版本: | 6.6.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
<?php amcharts_insert( $chart_id ); ?>
The plugin has also many helpful functions:
/wp-content/plugins/amcharts/
directory.Yes. You can either set the plugin to use publically available libraries loaded from www.amcharts.com or from your local server. = Which version of amCharts library does the plugin use? Plugin will use amCharts 5 when installed anew. You are able to switch between versions in plugin's settings.
No. This plugin allows editing a code directly in Wordpress admin as well as inserting the charts into posts or pages using shortcodes. It's not a fully fledged chart/map editor. It's a plugin designed to get your chart/map code into Wordpress easily.
Nope. The plugin will take care of that for you. The required JavaScript libraries will be included in the footer of the page automatically. Plugin will include only those libraries that are actually required to render the chart. If no charts are there on the page, no additional libraries will be included. Let's keep the footprint small ;)
Yes. Use the following PHP code:
<?php amcharts_insert( $chart_id ); ?>
Or, you can retrieve the chart object using following function:
<?php amcharts_get( $chart_id ); ?>
This will return an object with the following properties:
Yes, starting from version 1.0.7.
Any parameter prefixed with "data-" will be passed into chart code via global AmCharts.wpChartData object.
I.e.:
[amcharts id="pie-1" data-file="data1.csv" data-sort="asc"]
The above shortcode will insert the following code before actual chart code:
AmCharts.wpChartData = { "file": "data1.csv", "sort": "asc" }
You can then reference those passed variables in your chart code. I.e.:
alert( AmCharts.wpChartData.file );
= Are there any filters available?
Yes:
<iframe>
.