You might not always intend to use an XML file for passing data to the chart. You might have built an XML string inside your flex application. FusionCharts for Flex allows you to set an XML string to provide data to the chart. In this section, we will discuss how to render a chart using data from XML string. |
Before you continue, we recommend you to go through the 'Data from XML File' section, as we start off from the concepts explained in that section. |
We will continue with the chart that you created in the previous example. Here, instead of providing the XML file's path, we would pass the XML as hard-coded String variable in Flex. The code for this is given below. Please note that in your real application, you might need to build the XML string passing through different data building phases. |
<?xml version="1.0" encoding="utf-8"?> <ns1:FusionCharts x="10" y="10" FCChartType="Column3D" FCDataXML="{xmlData}" /> <mx:Script> //Create a string with valid chart XML. |
As shown by the highlighted portion of the code:
|
![]() |
To know more about the attributes/parameters like FCDataURL, FCDataXML, FCChartType, etc., please go through Chart API Reference section's FusionCharts Properties page. |