flashMovie.setData(data,[rebuild])
This function can be used for setting the chart's data on the fly. Data must be in CSV or XML form, as per the <data_type> setting.
The "rebuild" option might be "true" or "false" (the default is "true"). If you set it to "false", then the new data will not be applied until you call another new JS function: flashMovie.rebuild() or pass another set of settings/data with the "rebuild" set to "true".
flashMovie.appendData(data[,remove_count])
This function can be used to append new data to the existing dataset. This is extremely useful when your dataset is quite big and you add a few values every period, and don't want to reload the whole dataset. The data must be in CSV or XML form, as per the <data_type> setting. The remove_count variable is optional and sets the number of data points that should be removed from the beginning of dataset.
NOTE: if you are updating your graph with relatively small intervals (1-2 seconds) we highly recommend using setData instead of appenData. Calling appendData too frequently uses significantly more resources than setData and might cause some irregularities in data display.
flashMovie.setSettings(settings[,rebuild])
This function can be used to set multiple (or a single) setting at a runtime. The settings must be passed in XML form, using the same names as in settings file. The settings string must not contain line breaks, double quotes must be replaced with single quotes. For example:
flashMovie.setSettings("<settings><background><color>#CC0000</color><alpha>100</alpha></background></settings>");
The "rebuild" option might be "true" or "false" (the default is "true"). If you set it to "false", then the settings will not be applied until you call another new JS function: flashMovie.rebuild() or pass another set of settings with the "rebuild" set to "true".
flashMovie.getSettings()
This function will ask Flash to return the whole settings XML. When you call this function to return the data, Flash will call the amReturnSettings(chart_id, settings) function.
flashMovie.rebuild()
This function will rebuild the chart. If you set some settings using setSettings() function, with the "rebuild" set to "false", then you can use this function to redraw the chart after several portions of settings were set.
flashMovie.reloadData([file_name])
This function will reload the data. The file_name variable is optional, if you do not set it here, data from the original file will be reloaded. You can set a new data file every time you call this function.
flashMovie.reloadSettings([file_name])
This function will reload the settings. The file_name variable is optional, if you do not set it here, settings from the original file will be reloaded. You can set a new settings file every time you call this function.
flashMovie.reloadAll([data_file_name][,settings_file_name])
This function will reload both data and settings. The names of the files are optional, if you do not set them, the original file names will be used.
flashMovie.setParam(param, value)
This function lets you change a single setting. The parameter names are formed using the section name and the parameter name, separated with a period. For example, the background opacity setting is:
<background> <alpha></alpha>
The parameter name will be: background.alpha
Or, the legend key size setting is:
<legend>
....
<key>
<size></size>
The parameter name will be: legend.key.size
As there may be more than one label, graph or guide, you should add its sequential number in square brackets (counting from 0), for example:
graphs.graph[0].title
or
labels.label[1].text
flashMovie.getParam(param)
This function will ask Flash to return the value of a setting. The parameter name is formed in the same way as the setParam function (described above). When you call this function to return the setting value, Flash will call the amReturnParam(chart_id, param) function.
flashMovie.getData()
This function will ask Flash to return the whole data. When you call this function to return the data, Flash will call the amReturnData(chart_id, data) function.
flashMovie.exportImage([file_name])
This function will start the process of exporting the chart as an image. The file_name is a name of a file to which image data will be posted (files provided in the download package are export.php and export.aspx). The file_name is optional and can be set in the <export_as_image><file> setting.
flashMovie.print()
This function will print the chart. Use this print function if you don't have any values rotated by 90 degrees, also if you don't have a custom bitmap background.
flashMovie.printAsBitmap()
Another print function. Use it if you have values rotated by 90 degrees and/or a custom bitmap background.
amChartInited(chart_id)
This function is called when the chart is fully loaded and initialized.
amReturnData(chart_id, data)
This function is called when you request data from a chart by calling the flashMove.getData() function.
amReturnSettings(chart_id, settings)
This function is called when you request settings from a chart by calling the flashMove.getSettings() function.
amReturnImageData(chart_id, data)
When exporting chart as an image, the chart passes image data to this function.
amReturnParam(chart_id, param)
This function is called when you request a setting from a chart by calling the flashMovie.getParam(param) function.
amError(chart_id, message)
This function is called when an error occurs, such as no data, or file not found.
amProcessCompleted(chart_id, process_name)
This function is called when the chart finishes doing some task triggered by another JavaScript function.
| © Antanas Marcelionis Contact and feedback: info@amcharts.com | Subscribe to amCharts news |