I have a report that needs compare current year and previous year sales by
month in a clustered bar graph format. The peculiar thing about the chart as
coded right now is that March 2009 through December 2009 (which have no
sales data yet) display the February sales value instead of zero.
 
I have tried using  a cfchartdata with value = 0 for each of the future
months, but that messes up February. There must be something that I am not
understanding about how cfchartseries works.
 
Here is the code:
 
 <cfchart title="Web Sales - #c# Channel" chartwidth="450"
seriesplacement="cluster" showlegend="yes">
 
  <cfloop query="qry_selectyears">
  
   <cfquery name="qry_saleschanneldata" datasource="#request.reportds#">
    SELECT MonthBeginning, OrderCount, OrderTotal
    FROM WebSalesData
    WHERE Channel = '#c#'
    AND YEAR(MonthBeginning) = #qry_selectyears.SelectYear#
    AND OrderCount > 0
    ORDER BY MonthBeginning
   </cfquery>
 
   <cfchartseries type="bar" serieslabel="#qry_selectyears.SelectYear#">
    <cfoutput query="qry_saleschanneldata">
     <cfchartdata item="#dateformat(qry_saleschanneldata.MonthBeginning,
"mmm")#" value="#qry_saleschanneldata.OrderTotal#">
    </cfoutput>
   </cfchartseries>
   
  </cfloop> <!--- years --->
 </cfchart>
 
 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:319628
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to