Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
270 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 2000 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

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

715 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