FusionCharts for Flex > API Reference > Properties

FusionCharts for Flex component is made up of a class, named FusionCharts, that lets you create and render the chart within your Flex project. We access the same class as a visual component in Design mode.
 
<ns1:FusionCharts x="10" y="10" FCDataURL="Data.xml" FCChartType="Column3D" />
 
This object has four properties. These are listed below in a tabular form.
Property Name Description
FCChartType This property lets you set the type of the chart. The list of all available chart types is given in "List of Charts" page in Introduction section.
To know more about this, please see the "How to change the chart type?" section in "Creating Your First Chart" > "Creating Single Series Chart" page.
FCDataURL This property helps you to provide the path of your external XML file needed to build the chart.
FCDataXML It enables you to pass the entire chart XML as string.
FCDebugMode This attribute lets you open a debug window on top of chart. It takes either of the two value, true or false. If it is set to true, the debug window will open up. The default value is false.
FCFolder This attribute sets the folder where the chart SWF files are kept. By default, FusionCharts for Flex component assumes that the charts are present in "fusioncharts" folder in "src" or the folder where the application MXML files is present. But, the developer can always decide to keep the chart SWF files in some other folder. The value of this attribute would be a path relative to the Application MXML file's folder.
Example: "." - when the chart SWF files resides in the same folder as the Application MXML file.
"myCharts" - charts are in a folder named "myCharts" inside the Application MXML file's folder.
"resources\charts" - charts are in "charts" folder inside "resources" folder. The "resources" folder is placed in folder where Application MXML file is present.
 
Create Chart using script
You can create a chart only using script. The same properties would be involved while creating the chart. Below is a simple example:
 

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="showChart()" layout="absolute" >

   <mx:Script>
      <![CDATA[

         //import FusionCharts for Flex class
         import com.fusioncharts.components.FusionCharts;

         //execute the function when the application initializes
         private function showChart():void
         {
            //instantiate a FusionCharts for Flex object
            var FC:FusionCharts=new FusionCharts();                    

            //Set chart type

            FC.FCChartType="Column3D";
            //set chart data source XML
            FC.FCDataURL="Data.xml";

            // x, y position on stage
            FC.x=10;
            FC.y=10;

            //show the component in the stage

            addChild(FC);           
         }

      ]]>

   </mx:Script>

</mx:Application>

 
FCChartData Class
 
FusionCharts component has a class, named FCChartData, that helps you provide data of Array, XMLList or Model type to chart from your Flex project. This class can be accessed in Source View as a sub-node of FusionCharts component.
 
<ns1:FusionCharts x="10" y="10" FCChartType="Column3D">
    <ns1:FCChartData FCData="{chartData}" FCParams="{chartParams}" FCTrendlines="{chartTrends}" FCStyles="{chartStyles}"/>
</ns1:FusionCharts>
 
The following are the properties of the FCChartData class.
Property Name Description
FCData It lets you provide chart dataplots' data, from Array or XMLList or Model, to the chart.
FCParams This attribute helps you to set the chart parameters data, from Array or XMLList or Model, to the chart.
FCTrendLines It enables you to send the trendline data, from Array or XMLList or Model, to the chart.
FChTrendLines It enables you to send horizontal trendline data, from Array or XMLList or Model, to the chart. This is only applicable for XY Plot charts and Bubble charts.
FCvTrendLines It enables you to send vertical trendline data, from Array or XMLList or Model, to the chart. This is only applicable for XY Plot charts and Bubble charts.
FCStyles This attribute enables you to set the style data, from Array or XMLList or Model, to the chart.
ChartNoDataText If the chart fails to get renedered due to the absence of any XML data, an error message will be thrown. This attribute allows you to create user defined error message within your Flex project.
InvalidXMLText This attribute lets you customize the error message generated due to invalid XML data.
LoadDataErrorText It lets you customize the error message generated due to any error in loading the data.
ParsingDataText This attribute lets you customize the error message generated due to any error in parsing the data.
PBarLoadingText It attribute lets you customize the waiting message that tells the user to wait untill the chart gets loaded completely.
RenderingChartText This attribute lets you customize the waiting message that tells the user to wait untill the chart gets rendered completely.
XMLLoadingText It attribute lets you customize the waiting message that tells the user to wait untill the XML gets retrieved completely.