Due to Flash's security restrictions all JavaScript integration is disabled when the page that displays chart is loaded locally (file://). In order for functions to work you need to load it through a web server (http://). Even the web server running through localhost will do.
If you want to display HTML elements over Flash objects you need to set a "wmode" parameter when instantiating them. I.e.:
... so.addParam("wmode", "opaque"); ...
If you need to overlay HTML elements over amCharts you can use "opaque". If you need HTML elements, underlying amCharts to "shine through" you can go with "transparent".
Please note, that it's not advisable to set wmode unless absolutely necessary since it adds additional overhead on page performance.
The chart can't automatically deduce it's object id. In order for amCharts to be able to return id you need to supply it as a Flash variable:
var so = new SWFObject("amline/amline.swf", "amline", "520", "400", "8", "#FFFFFF"); ... so.addVariable("chart_id", "amline"); ...
Please note that it should be the same as you supply it for the SWFObject.
Flash caches externally loaded files. Try clearing your browser cache and reloading the page that displays charts.
If you settings/data changes frequently you might want consider turning on "add_time_stamp" setting. It will cause amCharts to add timestamp parameter to file loads which in turn will circumvent any browser caching mechanism.
<add_time_stamp>true</add_time_stamp>
| © Antanas Marcelionis Contact and feedback: info@amcharts.com | Subscribe to amCharts news |