Hi,
Is there any way to create a chart using time values for the series?
For example I have a query that calculates the average time a user has spent on technical help calls in a month. The query works fine.
I want to display the results of the query in a bar chart.The chart does not work, it wont accept time values.
Is there a way to convert the time values to simple numbers maybe?
Im using MySQL 5.
QUERY :-
<cfquery name="avgduration" datasource="datasource">
SELECT userid, SEC_TO_TIME(AVG(TIME_TO_SEC(TIMEDIFF(closedtime,opentime)))) AS average
FROM datasource
WHERE opendate BETWEEN '2009-02-01' AND '2009-02-28' AND loginname = 'userid'
GROUP BY userid
</cfquery>
CHART :-
<cfchart format="png"
chartheight="300"
chartwidth="450"
showxgridlines="yes"
showygridlines="yes"
xaxistitle="Operators"
yaxistitle="AVG Call Duration"
title="AVG Call Duraration By Operator">
<cfchartseries type="bar"
datalabelstyle="value"
query="avgduration"
itemcolumn=""
valuecolumn="average">
</cfchartseries>
</cfchart>
Many thanks for any comments
Is there any way to create a chart using time values for the series?
For example I have a query that calculates the average time a user has spent on technical help calls in a month. The query works fine.
I want to display the results of the query in a bar chart.The chart does not work, it wont accept time values.
Is there a way to convert the time values to simple numbers maybe?
Im using MySQL 5.
QUERY :-
<cfquery name="avgduration" datasource="datasource">
SELECT userid, SEC_TO_TIME(AVG(TIME_TO_SEC(TIMEDIFF(closedtime,opentime)))) AS average
FROM datasource
WHERE opendate BETWEEN '2009-02-01' AND '2009-02-28' AND loginname = 'userid'
GROUP BY userid
</cfquery>
CHART :-
<cfchart format="png"
chartheight="300"
chartwidth="450"
showxgridlines="yes"
showygridlines="yes"
xaxistitle="Operators"
yaxistitle="AVG Call Duration"
title="AVG Call Duraration By Operator">
<cfchartseries type="bar"
datalabelstyle="value"
query="avgduration"
itemcolumn=""
valuecolumn="average">
</cfchartseries>
</cfchart>
Many thanks for any comments