Skip to main content
Inspiring
September 5, 2006
Question

cfchart help needed

  • September 5, 2006
  • 3 replies
  • 330 views
Yes I searched through the history on this and found where people had attempted to answer.... but I still don't get it.

I want a graph that has distance numbers going up the y-axis and dates going across - verticaly (perferably in a mmm-d format)

My Query:
<cfquery name="totalMonth" datasource="2onboard">
SELECT sum(distance) AS curMonthDistance, sum(time) AS curMonthTime
FROM bockWalk
WHERE Month(walkDate) = #Month(Now())# AND Year(walkDate) = #Year(Now())#
</cfquery>

My existing cfchart code:
<cfchart format="jpg"
chartwidth="575"
chartheight="150"
yaxistitle="Miles"
showygridlines="yes"
labelformat="number"
showborder="yes">
<cfchartseries type="bar"
query="monthlyChart"
valuecolumn="distance"
itemcolumn="walkDate"
seriescolor="ff0000">
</cfchartseries>
</cfchart>

Currently I get what I want except the date format is shown as yyyy-mm-dd 00:00:00 and is horizontal.

I would also like for this to be in flash, but if I put "flash" in the format line, nothing shwos up.

Extended thought - I would like to include a second field of information (time - number field) as part of the rollover feature.

stumped
This topic has been closed for replies.

3 replies

jkgivenAuthor
Inspiring
September 6, 2006
OOPS - wrong query

Anyway, thanks for the help - I'll continue to wade through and see what I can come up with.
Inspiring
September 6, 2006
I had problems with the Flash element working.
Not sure if im thinking of somthing eles here, but is it something to do with the Web site directory permissions, got to be write or script or something.

Have a look along those lines, sorry I cant be more specific but it was so long ago, I had the same problem as yourself with no Flash showing up.
September 6, 2006
The cfquery columns posted do not match the chartseries columns.

Also, for cfchart issues, it helps if you list a table of the numbers you are plotting anyway (the results of the query).

If you are running CF7, then you can do what you want using xml stlyes. Lookup "ChartDirector" or "Web Charts designer".
For example, this XML style:
<?xml version="1.0" encoding="UTF-8"?>
<frameChart>
<xAxis>
<labelStyle isMultiline="false" orientation="Vertical"/>
</xAxis>
</frameChart>

should get you started.