I just upgraded from CF7 MX to CF9 and now my stacked bar charts are incorrect.
Here is my query:
SELECT a.account_type, a.dept_num, count(a.ids) AS counter
FROM accounts a
WHERE a.dept_num between 1401 AND 1499
GROUP BY a.account_type,a.dept_num
ORDER BY a.dept_num, a.account_type ASC
The table of data looks like this:
Dept_num counter account_type
1401 1 Faculty
1401 40 Staff
1472 25 Faculty
1472 2 Professor
1472 59 Staff
1474 17 Faculty
1474 2 Professor
1474 69 Staff
Previously with CF7, the chart had all account totals stacked in their
appropriate departments. Like 1401 had 41 accounts (40+1 stacked), 1472 had 86
accounts (25+2+59 stacked), etc.
Now running the same code with CF9, it's taking all of the totals and stacking
them into each dept so the total accounts is the same in every department.
1401 has 215 accounts; 1+40+25...+69 stacked. 1472 also has 215 accounts... etc.
Here's the code:
<cfchart format="jpg" xaxistitle="Department:" showlegend="yes"
seriesplacement="stacked" yaxistitle="Accounts:" fontSize="9" chartHeight="400"
chartWidth="800">
<cfloop query="accttype2">
<cfchartseries type="Bar" seriesLabel="#accttype2.account_type#">
<cfchartdata item="#accttype2.dept_num#" value="#accttype2.counter#" >
</cfchartseries>
</cfloop>
</cfchart>
I'm out of ideas on how to fix this. Anyone have some suggestions?
Thanks,
Chris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329690
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4