espresso_coffee
espresso_coffee

Reputation: 6110

How to fix chart in ColdFusion 11?

Like many other people who switched from CF9 to CF11, I'm having issues with charts too. My chart worked perfectly fine in CF9. After we did an update to CF11, a few things just disappeared or do not fit in the chart.

In my case I have two elements to fix. One is TITLE. The problem is that my title has frame for some reason and if I have more than one row with the text, that cannot fit in the title. Second is XAXISTITLE does not show up on the screen at all. Here is my code that I used in CF9 to build my chart:

<cfchart format="#ffPrint#" xaxistitle="#desc#" yaxistitle="#yTitle#" style="ChartStyle.xml"
         chartheight="700" chartwidth="#graphWidth#" title="#title#"  showlegend="#theLegend#" > 

I played with my code and tried to remove some parts to see how that will effect CF11 and I found if I remove STYLE, my xaxistitle showed up, but still with wrong values. Also I could not find the way how to resize my TITLE box.

For example my title looked like this in CF9:

  Washington DC
  4th Conference 
  Date: 07/01/2015 - 07/08/2015
  Time: 08am - 4pm

all these info are stored in #title# variable.

xaxistitle has just simple name that was on the bottom of the graph column. Something like JOHN COOK and that text was with the angle, wasn't just horizontal. This is the code that I used for that:

<cfoutput query="getRecords" group="Year">
    <cfchartseries type="bar" itemcolumn="#Year#" valuecolumn="count" seriescolor="#listGetAt(Colors,colorId)#" >
    <cfset colorId++>
      <cfoutput>
            <cfchartdata item="#description#" value="#count#">
      </cfoutput>
    </cfchartseries>
</cfoutput> 

If anyone can help with this problem please let me know. Thank you.

Upvotes: 2

Views: 398

Answers (0)

Related Questions