• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Time Values In CFChart

Guest
Mar 13, 2009 Mar 13, 2009

Copy link to clipboard

Copied

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 either in the query or using a function?
The time format is hh:mm:ss
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
TOPICS
Advanced techniques

Views

677

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 10, 2009 Sep 10, 2009

Copy link to clipboard

Copied

I'm not clear what you want to mean. So, I've attached Chart Image as far as I know regarding your message.

GraphDataCALYYRYQ.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2009 Sep 11, 2009

Copy link to clipboard

Copied

LATEST
The chart does not work, it wont accept time values.

Can you pls quantify "does not work" and "won't accept"?

What do you get: an error; unexpected output; what?

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation