Using with Database and scripts > FusionCharts, ColdFusion and dataXML method |
Here, we'll see how to use FusionCharts with ColdFusion using dataXML method. As we had earlier seen the dataXML method needs just one page:
The code for Chart.cfm can be listed as under: |
<html> <!--- Get a list of years to display in
top drop down selection---> <!--- If no form has been submitted yet,
default year to first year from the query above ---> |
In this page, there is an array Colors defined, whose code can be listed as under: |
<cfset Colors = ArrayNew(1)> <cfset Colors[1] = "9A6606"> <cfset Colors[2] = "639A63"> <cfset Colors[3] = "7B7DB2"> <cfset Colors[4] = "FA9934"> <cfset Colors[5] = "CCCE04"> <cfset Colors[6] = "9C02FC"> <cfset Colors[7] = "9D999B"> <cfset Colors[8] = "9CFECC"> <cfset Colors[9] = "FFD1A3"> <cfset Colors[10] = "E8E88D"> |