I have written a query of queries that returns the required results. From those 
results I find aggregates of the various data groupings being returned (these 
are stored in session variables). 

What I need to do now is to use the aggregate results that exist in session 
variables to create a pie chart, but I have not found a way to do this. It 
seems I will necessarily have to save the information in a database and then 
use that information to create the chart.

I want to know if there is a way to just use the values in the session 
variables to create the chart. TIA

NB: Parts of my code are below:

<!--- Query of Queries to return winning party --->

<cfquery name="WinningConstituency" dbtype="query" 
maxrows="#SESSION.ConstituenciesReturning#">
  select * from VotesByConstituency 
  order by TotalVotes desc
   
</cfquery>




<cfoutput query="WinningConstituency">

<!--- check which party won in the retrieved constituency and update its 
counter --->

<cfif #WinningConstituency.Party# eq "CPP">
      <cfset SESSION.CppMPCount = SESSION.CppMPCount + 1>
          
<cfelseif #WinningConstituency.Party# eq "DFP">
      <cfset SESSION.DfpMPCount = SESSION.DfpMPCount + 1>
          
<cfelseif #WinningConstituency.Party# eq "GCPP">
      <cfset SESSION.GcppMPCount = SESSION.GcppMPCount + 1>
          
<cfelseif #WinningConstituency.Party# eq "NDC">
      <cfset SESSION.NdcMPCount = SESSION.NdcMPCount + 1>
          
<cfelseif #WinningConstituency.Party# eq "NPP">
      <cfset SESSION.NppMPCount = SESSION.NppMPCount + 1>
          
<cfelseif #WinningConstituency.Party# eq "PNC">
      <cfset SESSION.PncMPCount = SESSION.PncMPCount + 1>
          
<cfelse>
</cfif>

   
<td>#WinningConstituency.ConstituencyName#</td><td>#WinningConstituency.Party#</td><td>#WinningConstituency.TotalVotes#</td>
   
   </tr> <!--- end of result row --->
   
</cfoutput> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313118
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to