FusionCharts and ColdFusion> Using dataXML method |
Previously, we had seen how to use the dataURL method to create a dynamic column chart using FusionCharts and ColdFusion. Here, we'll be creating the same chart but using dataXML method. As we had earlier seen, the dataXML method just requires one page:
The above page is present in the downloads under the folder FusionCharts2_3 > Sample Code > DBExamples > CF > dataXML. The page Chart.cfm is responsible for everything - rendering the year down box, getting the selected year, creating the XML data for that year and then rendering the chart for that year. The code for this page can be reproduced as under: |
<html>
|
In the above code, we're doing the following:
When you now see Chart.cfm in your browser, you'll get the following output: |