Time for action — changing the Invalid data message
1. Create a copy of
ChartBackground.html
andChartBackground.xml
, and rename them toCustomChartMessage.html
andCustomChartMessage.xml
respectively.2. Open
CustomChartMessage.html
and add the following highlighted line of code in it:<div id="chartContainer">FusionCharts will load here!</div> <script type="text/javascript"><!-- var myChart = new FusionCharts("../FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "1" ); myChart.setXMLUrl("ChartBackground.xml"); myChart.configure("InvalidXMLText", "The world has a new order. This chart shall not render."); myChart.render("chartContainer");// --> </script>
3. Open
CustomChartMessage.xml
and mess up the XML. Don't be too destructive, removing a closing>
will do the trick too.4. Open
CustomChartMessage.html
in a browser and see how the world has a new order.
What just happened?
We modified the default message of the InvalidXMLText
attribute. After the...