FusionCharts for Flex > Special Cases > Changing Chart Messages

FusionCharts for Flex allows you to change the various messages that gets displayed to the user like "No data to display", "Loading Chart", "Retrieving data" etc.

The following attributes define the different messages for the charts/widgets:

Attribute Name What message it controls
PBarLoadingText Loading Chart. Please Wait
XMLLoadingText Retrieving Data. Please Wait
ParsingDataText Reading Data. Please Wait
ChartNoDataText No data to display.
RenderingChartText Rendering Chart. Please Wait
LoadDataErrorText Error in loading data.
InvalidXMLText Invalid XML data.
 

Let's quickly see an example where we change the chart's no data to display message. This can be effectively useful when you want to start the chart with empty data and then populate data on a user interaction.

To change the "No data to display message", you'll need to use the following MXML code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:ns1="com.fusioncharts.components.*" >

<ns1:FusionCharts x="10" y="10" >
<ns1:FCChartData ChartNoDataText="Please select a record above" />
</ns1:FusionCharts>

</mx:Application>

In the above code, we're first adding the FCChartData sub-tag to our basic FusionCharts tag. After this, we assign the new message to the ChartNoDataText property of the tag changing the "No data to display.." message of the chart. When you run this chart, you'll get the following message instead of the normal message, which may be way more intuitive to the user for the given context:

Please note that these atributes are applicable to all charts and widgets.