Solved

How do I create a pie chart (cfchart) using the data from a single column in a database?

Posted on 2007-12-04
3
269 Views
Last Modified: 2013-12-24
I have a database (ms access) that has a field named "completed".  There are 12 records in the Database.
The field is populated with three possible choices:
No Action
On Hold
Completed
My question is how do I create a Pie Chart to show the number of, and  percentages for each of these possibilities?

Thanks,
0
Comment
Question by:ozziemac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:73Spyder
ID: 20402310
http://www.fusioncharts.com/free/

Check out this companies free charts.  We use the professional set.  You create the xml from your data set and send it into the chart.  Looks way way better than cfchart.

And no... I don't work for the company...just like the charts.
0
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 20406086
Here is one way.  The advantage of cfchart is its simplicity.  But I agree with 73Spyder.  There are better charting packages out there.
<!--- or change COUNT(*) to a SUM(SomeColumn) if needed --->
<cfquery name="getTotals" datasource="YourAccessDSN">
    SELECT  Completed, COUNT(*) AS NumberCompleted
    FROM    YourTable
    GROUP BY Completed
</cfquery>
 
<cfchart pieslicestyle="solid">
	<cfchartseries type="pie"
		query="getTotals"
		itemcolumn="Completed"
		valuecolumn="NumberCompleted"
		dataLabelStyle="pattern"		
		/>
</cfchart>

Open in new window

0
 

Author Closing Comment

by:ozziemac
ID: 31412555
Worked well.  I will also take your advice and look for a different charting package.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question