我在具有cfchart和cfchartseries的CF页面上收到无效的颜色错误。我还没有重现这个问题,但是当用户遇到它时我们会收到电子邮件通知。我无法隔离问题,所以我必须提供完整的代码块。任何帮助将不胜感激。
代码:
<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>
--->
堆栈追踪:
org.xml.sax.SAXParseException:颜色名称无效:白色at com.gp.xml.util.XmlHandler.throwSAXException(XmlHandler.java:279)at at com.gp.xml.util.XmlHandler.setValue(XmlHandler.java:169)at at com.gp.xml.util.XmlHandler.startElement(XmlHandler.java:85)at com.gp.xml.parser.XmlParser.parseXmlToken(XmlParser.java:202)at at com.gp.xml.parser.XmlParser.parseToken(XmlParser.java:119)at at com.gp.xml.parser.XmlParser.parse(XmlParser.java:92)at 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 at com.gp.api.styles.MxWidgetStyle.read(MxWidgetStyle.java:210)at at coldfusion.graph.Chart.getWebChartsStyleXml(Chart.java:183)at coldfusion.tagext.io.ChartTag._getGraphStyle(ChartTag.java:531)at at coldfusion.tagext.io.ChartTag.getGraphStyle(ChartTag.java:452)at coldfusion.tagext.io.ChartTag.doEndTag(ChartTag.java:558)
编辑:我还应该提一下,我们在Windows Server 2008 R2 6.1之上运行CF 9.0.1.274733,JRun4
答案 0 :(得分:1)
自错误
Invalid color name: white at com.gp......
表示您提供的代码中未引用的颜色,我猜您提供的代码实际上并不会导致问题。它可能位于cfchart标记周围的查询或某些代码中,但它看起来不像图表本身中的错误