cfchart ignores my scalefrom value

Posted by Monte Chan on Stack Overflow See other posts from Stack Overflow or by Monte Chan
Published on 2010-04-29T21:22:24Z Indexed on 2010/04/29 21:27 UTC
Read the original article Hit count: 385

Filed under:

Hi all,

I have the following codes in my page.

The style variable holds the custom style.

  <cfchart chartheight="450" chartwidth="550" gridlines="9"   yaxistitle="Score" scalefrom="20" scaleto="100" style="#style#"   format="png" >
         <cfchartseries query="variables.chart_query" type="scatter"   seriescolor="##000000" itemcolumn="MyItem" valuecolumn="MyScore"/>
     </cfchart>

Before I begin, please go to http://www.monteandjanicechan.com/chart_good.jpg. This is how I want my report to come up. On the x-axis, there will always be three items as long as at least one of them has values. If an item does not have any values (i.e. 2010), there would not be a marker in the chart.

The problem occurs only when only one item has value. Please see http://www.monteandjanicechan.com/chart_bad.jpg. As you can see, 2008 and 2010 do not have any values; y-axis is now scaled from 0 to 100. I have tried setting one of the items (ex. 2008) a value of 0 or something off the chart; it would scale according to this off-the-chart value and the 2009 value. In short, I have to have at least two items with values between 20 and 100 in order for cfchart to scale from 20 to 100.

My question is, how can I correct the issue so that cfchart would ALWAYS scale from 20 to 100? I am running CF9.

Thanks in advance, Monte

© Stack Overflow or respective owner

Related posts about coldfusion