cfchart output by month
I'm using CF10.
I want to output a count of events by the month they happened each.
Each month will always have at least 1 event, so I'm not worried about months with 0.
This is showing me the 12 months in order, but adding them up.
The query is retrieving records back through the last 3 years.
Where did I go wrong?
I want to show the months in order for the last three years.
<cfquery Name="OccOpenChart" datasource="#APPLICATION.DSN#">
SELECT
COUNT(OccurrenceNumber) As OccTotal,
year(DateofReport) as OccYear,
month(DateofReport) as Occmonth
FROM OccurrenceDateTracking
WHERE Year(DateofReport) > #thisyear#
GROUP BY year(DateofReport), month(DateofReport)
</cfquery>
<cfchart
format="png"
chartwidth="750"
chartheight="500"
showlegend="yes"
xaxistitle="Year of Report"
yaxistitle="Occurrence Count"
show3d="no"
tipstyle="none"
fontsize="12">
<cfchartseries
type="bar"
query="OccOpenChart"
dataLabelStyle="value"
itemcolumn="Occmonth"
valuecolumn="OccTotal"
serieslabel="Total" />
