Skip to main content
Inspiring
September 23, 2009
Question

cfchart help

  • September 23, 2009
  • 1 reply
  • 2586 views

I need to graph on y-axsis (Day 1-Day31 of month) on the x-axsis the code of metrics...and their progresses...

Lets say, a metric called "AHT" has the max data till 14 th of the month so the graph bar will be till 14th of the month...

Any help appreciated....

<cfquery name="GetChartData" datasource="#application.DSN_ORC#">
  SELECT   MAX( s.end_date ) AS enddate, m.sc_metric_code as metriccode
    FROM ops$rms.resource_score s, ops$rms.ref_metric m
    WHERE s.metric_code = m.metric_code
     AND EXTRACT( MONTH FROM s.end_date ) = '#Form.Month#'
     AND EXTRACT( YEAR FROM s.end_date ) = '#Form.Year#'
  GROUP BY s.end_date, m.sc_metric_code
</cfquery>

   <cfchart
     format="png"
     xaxistitle="Progress"
     yaxistitle="Date"
     chartheight="400"
     chartwidth="700"
     foregroundcolor="FFFAFA"
     backgroundcolor="BC8F8F"
     fontbold="yes"
     show3d="yes"
     databackgroundcolor="DDA0DD"
     font="Verdana"
     fontsize="13"
     showxgridlines="no"
     showygridlines="yes"
     labelformat="date"
     >
     <cfchartseries
       type="bar"
       seriescolor="8B4513"
      paintstyle="light" query="GetChartData"  itemcolumn="metriccode"  valuecolumn="EndDate" 
       >

     </cfchartseries>
   </cfchart>

This topic has been closed for replies.

1 reply

Inspiring
September 23, 2009

I need to graph on y-axsis (Day 1-Day31 of month) on the x-axsis the code of metrics...and their progresses...

Lets say, a metric called "AHT" has the max data till 14 th of the month so the graph bar will be till 14th of the month...

Any help appreciated...

What is the actual question here?  You've got the "I am trying to do this..." part down.  But there's not "and [something has happened which I did not expect]" part seems to be missing...

--

Adam

emmim44Author
Inspiring
September 24, 2009

Please see the attached image... It doesnt do what I need... I need some guidance..

Inspiring
September 27, 2009

i tried scale from to , and it doesnt do scale of 1-31...


I seem to remember something about having to supply a "gridlines" value as well to see the effect.  However, since your max scale is an uneven number (ie 31) you will probably end up with partial values on the Y-axis, like 4.832 days.  You will need to use the webcharts utility to format the Y-Axis values as integers. In particular the Design Tab -> YAxis section in the webcharts utility.

Here is a simple example that shows the YAxis values formatted as integers.  The two lines that control the Y-Axis formatting are in blue.

<cfsavecontent variable="style"><?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<frameChart is3D="false">
          <frame xDepth="12" yDepth="11"/>
          <yAxis scaleMin="1" scaleMax="31" labelCount="10">
               <labelFormat style="Integer" pattern="#,##0"/>

               <parseFormat pattern="#,##0.###"/>
               <groupStyle>
                    <format pattern="#,##0.###"/>
               </groupStyle>
          </yAxis>
</frameChart>
</cfsavecontent>
<cfchart format="jpg" style="#style#">
    <cfchartseries type="bar" query="GetChartData"  itemcolumn="metriccode" valuecolumn="enddate">
    </cfchartseries>
</cfchart>