My Favorite Thing About Coldfusion My Favorite Thing About Coldfusion

I’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:

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7930.html

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…

Published on May 28, 2013

Tags: Coldfusion

Related Posts

Did you enjoy this article? If you did here are some more articles that I thought you will enjoy as they are very similar to the article that you just finished reading.

Tutorials

Learn how to code in HTML, CSS, JavaScript, Python, Ruby, PHP, Java, C#, SQL, and more.

No matter the programming language you're looking to learn, I've hopefully compiled an incredible set of tutorials for you to learn; whether you are beginner or an expert, there is something for everyone to learn. Each topic I go in-depth and provide many examples throughout. I can't wait for you to dig in and improve your skillset with any of the tutorials below.