Charts 如何修复coldfusion 11中的CFC系列?
我正在尝试修复CF11中的cfchart,使其看起来与之前的CF9中的类似。我转换了.xml文件,而是使用JSON来设置元素的样式。我不能解决的问题是一系列的问题。我在图表系列中传递的数据看起来不错,在测试图表之前,我尝试在屏幕上输出所有数据。在CF9中,我的时间记录显示在屏幕上,从第一个值一直显示到最后一个值。这是我在CF9中图表的屏幕截图:Charts 如何修复coldfusion 11中的CFC系列?,charts,coldfusion,coldfusion-9,coldfusion-11,zingchart,Charts,Coldfusion,Coldfusion 9,Coldfusion 11,Zingchart,我正在尝试修复CF11中的cfchart,使其看起来与之前的CF9中的类似。我转换了.xml文件,而是使用JSON来设置元素的样式。我不能解决的问题是一系列的问题。我在图表系列中传递的数据看起来不错,在测试图表之前,我尝试在屏幕上输出所有数据。在CF9中,我的时间记录显示在屏幕上,从第一个值一直显示到最后一个值。这是我在CF9中图表的屏幕截图: <cfchart format="#ffPrint#" xaxistitle="#desc#" yaxistitle="#yTitle#" sty
<cfchart format="#ffPrint#" xaxistitle="#desc#" yaxistitle="#yTitle#" style="ChartStyle.xml"
chartheight="700" chartwidth="#graphWidth#" title="#title#" showlegend="#theLegend#" >
<cfchartseries type="bar" itemcolumn="Spacer" valuecolumn="" seriescolor="white" >
<cfoutput>
<cfloop list="#dataList#" index="i">
<cfchartdata item="#i#" value="0">
</cfloop>
</cfoutput>
</cfchartseries>
<cfoutput query="getRecords" group="theYear">
<cfchartseries type="bar" itemcolumn="#theYear#" valuecolumn="theCount" seriescolor="#listGetAt(theColors,colorIndex)#" >
<cfset colorIndex++>
<cfoutput>
<cfchartdata item="#Description#" value="#theCount#">
</cfoutput>
</cfchartseries>
</cfoutput>
</cfchart>
正如你在上面的图片中所看到的,我的所有时间段都按从最低到最高的顺序显示在屏幕上。此外,我2015年的记录以蓝色显示,2016年以粉色显示。现在,我将向您展示我的图表,其代码与CF11中的代码完全相同:
你可以看到,我在CF11中的图表以蓝色条开始,即现在的2015年和不应该在第一个位置的时间段1415。我的其他时间段也不会显示在屏幕上。我已经尽了很大的努力,但仍然没有找到任何解决办法。我想知道是否有人能帮助解决这个问题。下面是我的代码,我将向您展示CF9和CF11的代码
CF9中图表的代码:
<cfchart format="#ffPrint#" xaxistitle="#desc#" yaxistitle="#yTitle#" style="ChartStyle.xml"
chartheight="700" chartwidth="#graphWidth#" title="#title#" showlegend="#theLegend#" >
<cfchartseries type="bar" itemcolumn="Spacer" valuecolumn="" seriescolor="white" >
<cfoutput>
<cfloop list="#dataList#" index="i">
<cfchartdata item="#i#" value="0">
</cfloop>
</cfoutput>
</cfchartseries>
<cfoutput query="getRecords" group="theYear">
<cfchartseries type="bar" itemcolumn="#theYear#" valuecolumn="theCount" seriescolor="#listGetAt(theColors,colorIndex)#" >
<cfset colorIndex++>
<cfoutput>
<cfchartdata item="#Description#" value="#theCount#">
</cfoutput>
</cfchartseries>
</cfoutput>
</cfchart>
CF11中我的图表的代码:
<cfchart format="html" xaxistitle="#desc#" yaxistitle="#yTitle#" style="#cStyle#"
chartheight="700" chartwidth="#graphWidth#" title="#newTitle2#" showlegend="#theLegend#">
<cfoutput query="getRecords" group="theYear">
<cfchartseries type="bar" itemcolumn="#theYear#" valuecolumn="theCount" seriescolor="#listGetAt(theColors,colorIndex)#" serieslabel="#theYear#">
<cfset colorIndex++>
<cfoutput>
<cfchartdata item="#Description#" value="#theCount#">
</cfoutput>
</cfchartseries>
</cfoutput>
</cfchart>
为了获得CF11中的任何记录,我必须删除我的第一个CFChart系列,但如果我有2015年和2016年的组合记录,我的图表不会在屏幕上显示值。我认为这是一系列问题,但我不知道应该改变什么来解决这个问题。如果有人能帮忙,请告诉我
提前谢谢 您正在运行11的哪个版本(更新级别)?我知道关于cfchart做了一些工作。见本论坛帖子-。不确定它是否能解决您的问题。@Miguel\u F我读了那篇文章,我们已将CF11更新到最新版本(更新3)。