My Favorite Thing About Coldfusion
Published on May 28, 2013 by Jamie MunroIíll be honest; I have not written a line of Coldfusion in over 5 years.† It was one of the first languages I used professionally, I must emphasize that it wasnít personally!
But when I was regularly using it there was one function that I miss and wish was in other languages.† That function is cfchart!
P.S. yes this is really off topic, but after I got a LinkedIn message about a Coldfusion developer, it made me think back to my beginning days of development.
†In all seriousness, cfchart was an extremely useful function.† In reviewing Adobeís tech specs here:
Itís pure genius that I can do the following:
<cfchart format="flash" xaxistitle="Department" yaxistitle="Salary Average"> <cfchartseries type="bar" query="DataTable" itemcolumn="Dept_Name" valuecolumn="avgSal"> <cfchartdata item="Facilities" value="35000"> </cfchartseries> </cfchart>
Where DataTable is a cfquery:
<cfquery dbtype = "query" name = "DataTable"> SELECT Dept_Name, AVG(Salary) AS avgSal, SUM(Salary) AS sumSal FROM GetSalaries GROUP BY Dept_Name </cfquery>
A basic bar chart will be created where Dept_Name will be used for the items and avgSal will be used to plot the chart Ė pure awesomeness!
That was a blast from the past, sorry I donít have an example or picture to show Ė I donít even have Coldfusion running anywhere to create the most simplistic exampleÖ