2

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.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
espresso_coffee
  • 5,980
  • 11
  • 83
  • 193
  • (Edit) Can you post a small example (with hard coded values, not variables) that reproduces the issue? That would make it a lot easier for others to assist.. [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) – Leigh Mar 03 '16 at 20:50
  • I updated mu question. This might help you to understand how my graph looked like. – espresso_coffee Mar 03 '16 at 20:52
  • Thanks for adding more details, but you might want to review the MCVE link above :) Whenever possible, try and make any examples *self-contained*. Generally, the easier it is for some else else to run a code snippet in their environment, the faster (and more likely) you will get an answer. I wanted to help with this question, but did not have a lot of time. Looking at the code, I was not sure which variables were relevant or what values those variables should have ... so in the end, I did not look into it. – Leigh Mar 04 '16 at 00:54
  • 3
    Best way to fix charts in CF11 is to not use `cfchart`. You can use ZingCharts natively and it is actually easier than the `cfchart` implementation. – Scott Stroz Mar 04 '16 at 15:18

0 Answers0