1

I am getting an invalid color error on a CF page that has cfchart and cfchartseries. I have yet to reproduce this issue, but we get email notification when a user encounters it. I am unable to isolate the issue, so I have to provide the full code block. Any help would be appreciated.

Code:

  <cfchart format="png" chartwidth="270" xaxistitle="Visits last 7 Days" show3d="no" foregroundcolor="##333333" showborder="no" fontbold="yes" tipStyle="none" url="" showLegend="true"> 
        <cfchartseries type="line" query="chartData" itemcolumn="dateRange" valuecolumn="FLASHvisits" datalabelstyle="none" seriesLabel="FloorPlan">
        <cfif chartData.showVTS><cfchartseries type="line" query="chartData" itemcolumn="dateRange" valuecolumn="VTSvisits" seriesColor="blue"  datalabelstyle="none" seriesLabel="IDS"></cfif>
        <cfif chartData.showMobile><cfchartseries type="line" query="chartData" itemcolumn="dateRange" valuecolumn="MOBILEvisits" seriesColor="red"     datalabelstyle="none" seriesLabel="Mobile"></cfif>
    </cfchart>

  <!---
    The line that the stack trace says it's erroring on is:
    <cfif chartData.showMobile><cfchartseries type="line" query="chartData" itemcolumn="dateRange" valuecolumn="MOBILEvisits" seriesColor="red"   datalabelstyle="none" seriesLabel="Mobile"></cfif>
  --->

Stack Trace:

org.xml.sax.SAXParseException: Invalid color name: white at com.gp.xml.util.XmlHandler.throwSAXException(XmlHandler.java:279) at com.gp.xml.util.XmlHandler.setValue(XmlHandler.java:169) at com.gp.xml.util.XmlHandler.startElement(XmlHandler.java:85) at com.gp.xml.parser.XmlParser.parseXmlToken(XmlParser.java:202) at com.gp.xml.parser.XmlParser.parseToken(XmlParser.java:119) at com.gp.xml.parser.XmlParser.parse(XmlParser.java:92) at com.gp.xml.XmlReader.read(XmlReader.java:63) at com.gp.xml.XmlReader.read(XmlReader.java:55) at com.gp.api.styles.MxWidgetStyle.read(MxWidgetStyle.java:221) at com.gp.api.styles.MxWidgetStyle.read(MxWidgetStyle.java:210) at coldfusion.graph.Chart.getWebChartsStyleXml(Chart.java:183) at coldfusion.tagext.io.ChartTag._getGraphStyle(ChartTag.java:531) at coldfusion.tagext.io.ChartTag.getGraphStyle(ChartTag.java:452) at coldfusion.tagext.io.ChartTag.doEndTag(ChartTag.java:558)

EDIT: I should also mention that we are running CF 9.0.1.274733, JRun4, on top of Windows Server 2008 R2 6.1

Peter Boughton
  • 110,170
  • 32
  • 120
  • 176
wellercs
  • 143
  • 5
  • Is the email sent by the user himself or by your program code? – Dan Bracuk Jan 25 '13 at 03:02
  • code - we get a dump of the cfcatch as well as all of the scopes (session, url, cgi). nothing in those scopes looks unexpected though. I can of course provide them if there's something in particular you're curious about checking. – wellercs Jan 25 '13 at 13:14
  • What are the contents of the error dump? What is the error message? – Miguel-F Jan 25 '13 at 13:53
  • @Miguel-F the error dump/message is in the link I provided in the original post. it's the second file in the gist. – wellercs Jan 25 '13 at 17:27
  • @wellercs - 1) Are you sure that is the code causing the error? It would help to see the complete (unabridged) error dump. But from the error message it sounds like it choking on parsing the style xml. However it does not look like you are using a custom style. Any chance you modified the default xml files? 2) What kind of data are you charting? (Also, just FYI: when there is only a small amount of code, better to include it within your question. Peter kindly transferred the information already) – Leigh Jan 26 '13 at 19:02

1 Answers1

1

Since the error

Invalid color name: white at com.gp......

would indicate a color that isn't referenced in the code you provided, I would guess that the code you provided isn't actually causing the problem. It may be in the query or some code right around the cfchart tag but it doesn't look like the error is in the chart itself

Lance
  • 3,193
  • 2
  • 32
  • 49