FusionCharts for Flex component also allows developers to use the existing Flex data sources namely, Array, XMLList and Model, to provide data to chart. |
Note that FusionCharts internally can accept only XML data (XML file or XML string). FusionCharts for Flex component makes this limitation more flexible for Flex developers. It adds another component or class named FCChartData to accept data from Array, XMLList or Model. It internally converts the data into XML and finally passes the XML to the chart. |
Before you go further, we recommend you to go through the previous pages, as we start off from the concepts explained in those pages. |
We again use the first example and modify it to show how chart data can be provided using ArrayCollection. The code for this is given below: |
<?xml version="1.0" encoding="utf-8"?> //Create an ArrayCollection object as a data source for chart |
As you can see in the highlighted section above:
|
Please refer to "FusionCharts and XML » Chart XML Reference" section to know more on how to use parameters and elements from FusionCharts XML while providing data as Array. |
To know more about FCData and its attributes please go through the Class Structure Properties page under API Reference. |
Now, if you run the above code in your Flex project, you will get the following chart: |
![]() |