Skip to main content
March 10, 2010
Question

CFChart Creates Phantom Data. Need tips on how to fix.

  • March 10, 2010
  • 2 replies
  • 528 views

   I'm running this code in Coldfusion 8 Standard and it creates 3 phantom bars for Employee hours when no data is present.

Any ideas on how to fix this?

<cfchart format="flash" xaxistitle="Date" yaxistitle="Total Hours" chartwidth="600" chartheight="400">
        <cfchartseries type="bar" itemcolumn="ENDINGDATE"
            valuecolumn="TOTALHOURS" seriescolor="##009900" serieslabel="Contractor Hours" >   
  <cfchartdata item="09/29/2007 " value="21">
  <cfchartdata item="10/13/2007" value="20">
  <cfchartdata item="10/27/2007 " value="20">
  <cfchartdata item="11/24/2007 " value="7">
  <cfchartdata item="01/19/2008 " value="1">
            </cfchartseries>

        <cfchartseries type="bar" itemcolumn="ENDINGDATEFAA"
            valuecolumn="TOTALHOURSFAA" seriescolor="##0000CC"  serieslabel="Employee Hours" >   
          <cfchartdata item="09/29/2007 " value="5">    
          <cfchartdata item="10/13/2007 " value="6">           
            </cfchartseries>           

</cfchart>

Message was edited by: ColdFusionUsers2 .didn't include all the code

    This topic has been closed for replies.

    2 replies

    March 11, 2010

    Thanks,

    My bug ID is 82410

    Inspiring
    March 10, 2010

    It doesn't state this in the docs, but about 2min of fiddling with your code suggests that one needs to provide all the data points for each series item, whether it has a value or not.  Otherwise the last <cfchartdata> is used for all the subsequent data points.

    --

    Adam

    March 10, 2010

    If I use blank data points I overlay 4 database queries.  I think I'll need to create some crazy join statements to create blank data I feel logically that I'm just missing something in the code or this is a bug.

    Inspiring
    March 10, 2010

    Oh: I'd say it's a bug: there's no way this is legitimate behaviour.  But it is what it is.

    You might want to raise it as a bug:

    http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html

    --

    Adam