Stretchwickster
Programmer
Hi,
I'm learning to develop using Coldfusion MX and have constructed a simple poll adapted from an online tutorial. At present I know my queries are correct as I am using cfdump to output them. However, when I try to output these queries as a pie chart I just get a 600x400 lump of white space. When I right-click the white space I get a Flash specific local menu so I know it's getting half-way there!
Does anyone have any ideas?
(P.S. Try not to laugh as its a rather comical example.)
Clive![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
I'm learning to develop using Coldfusion MX and have constructed a simple poll adapted from an online tutorial. At present I know my queries are correct as I am using cfdump to output them. However, when I try to output these queries as a pie chart I just get a 600x400 lump of white space. When I right-click the white space I get a Flash specific local menu so I know it's getting half-way there!
Does anyone have any ideas?
Code:
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en" lang="en">
<head>
<title>Poll Results</title>
</head>
<body>
<!--- Ensure parameters passed are all defined --->
...
<!--- Retrieve database data --->
...
<cfquery name="BananaListMethod0" datasource="examplesource">
SELECT BananaPeelMethod, COUNT(*) AS method0_count
FROM banana_peeling
WHERE BananaPeelMethod = 0
GROUP BY BananaPeelMethod;
</cfquery>
<cfquery name="BananaListMethod1" datasource="examplesource">
SELECT BananaPeelMethod, COUNT(*) AS method1_count
FROM banana_peeling
WHERE BananaPeelMethod = 1
GROUP BY BananaPeelMethod;
</cfquery>
<!--- page heading --->
...
<cfoutput>
<!--- echo chosen form value back to user --->
...
There are #get_results.recordcount# people who peel a banana the way you do!
<br />
<!--- show results as a pie chart --->
[Begin Chart]
<cfchart showborder="yes" show3d="yes" chartwidth="600" chartheight="400" pieslicestyle="sliced">
<cfchartseries type="pie" query="BananaListMethod0" itemcolumn="BananaPeelMethod" valuecolumn="method0_count">
<cfchartdata item="Method 1" value="#BananaListMethod1.method1_count#">
</cfchartseries>
</cfchart>
[End Chart]
<br />
<hr size="1" noshade>
<cfdump var="#BananaListMethod0#" label="Number of Method 0 Peelers"><br />
<cfdump var="#BananaListMethod1#" label="Number of Method 1 Peelers"><br />
</cfoutput>
</body>
</html>
Clive
![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer."
Paul Ehrlich
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096