2 Replies - 7514 Views - Last Post: 11 June 2012 - 11:46 AM Rate Topic: -----

#1 rikkp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 26-March 12

cf chart not being displayed

Posted 07 June 2012 - 09:40 AM

The code shown here works fine on several machines but will not work on the remote server.
I have tried changing the format to flash, png and jpg but when the action page loads the chart shows as a missing image (red X).
When the format is set to flash tht title shows up but nothing else. The title is a field from the form that is being displayed as text above the chart tag.
here is the form page code
<form action="GraphFormAct.cfm" method="post">
 Graph Title:<input name="gtitle" type="text" />

X Aaxis Title: &nbsp; &nbsp;<input name="xAxis" type="text" /><br />
Y Aaxis Title: &nbsp; &nbsp;<input name="yAxis" type="text" /><br />

x Axis 1: <input type="text" name="source1"> &nbsp; yAxis 1 value: &nbsp;<input type="text" name="s1val" size="6">
x Axis 2: <input type="text" name="source2"> &nbsp; yAxis 2 value: &nbsp;<input type="text" name="s2val" size="6">
x Axis 3: <input type="text" name="source3"> &nbsp; yAxis 3 value: &nbsp;<input type="text" name="s3val" size="6">
x Axis 4: <input type="text" name="source4"> &nbsp; yAxis 4 value: &nbsp;<input type="text" name="s4val" size="6">



here is the action page code
<!---create the array --->
<cfset chart = ArrayNew(2)>

<!---populate the array --->
 <cfif IsDefined ("form.source1") and #form.source1# NEQ "">
<cfset chart [1] [1] = "#Form.source1#">
<cfset chart [1] [2] = "#Form.s1val#">
</cfif>

<cfif IsDefined ("form.source2") and #form.source2# NEQ "">
<cfset chart [2] [1] = "#Form.source2#">
<cfset chart [2] [2] = "#Form.s2val#">
</cfif>

<cfif IsDefined ("form.source3") and #form.source3# NEQ "">
<cfset chart [3] [1] = "#Form.source3#">
<cfset chart [3] [2] = "#Form.s3val#">
</cfif>

<cfif IsDefined ("form.source4") and #form.source4# NEQ "">
<cfset chart [4] [1] = "#Form.source4#">
<cfset chart [4] [2] = "#Form.s4val#">
</cfif>

<cfif IsDefined ("form.source5") and #form.source5# NEQ "">
<cfset chart [5] [1] = "#Form.source5#">
<cfset chart [5] [2] = "#Form.s5val#">
</cfif>

<cfif IsDefined ("form.source6") and #form.source6# NEQ "">
<cfset chart [6] [1] = "#Form.source6#">
<cfset chart [6] [2] = "#Form.s6val#">
</cfif>

<cfif IsDefined ("form.source7") and #form.source7# NEQ "">
<cfset chart [7] [1] = "#Form.source7#">
<cfset chart [7] [2] = "#Form.s7val#">
</cfif>

<h3><cfoutput>#Form.gtitle# </cfoutput></h3>
<cfchart
xaxistitle="#Form.xAxis#"
yaxistitle="#Form.yAxis#"
chartwidth="400"
chartheight="430"
foregroundcolor="ff6600"
databackgroundcolor="ffffff"
fontsize="14"
showborder="yes"
gridlines="24"
showygridlines="yes"
   format="jpg"
   scalefrom="0"
   scaleto="14"
   show3d="Yes">
   
   <cfchartseries
      type="bar"
      serieslabel="Toilet"
      seriescolor="0060a9">
      <cfloop from="1" to="#ArrayLen ( chart )#" index="row"> 
      <cfoutput>
    <cfchartdata item="#chart[row] [1]# " value="#chart[row] [2]#">
    </cfoutput>
</cfloop>
  </cfchartseries>
   </cfchart>


This post has been edited by Atli: 07 June 2012 - 09:51 AM
Reason for edit:: Fixed the [code] ... [/code] tags.


Is This A Good Question/Topic? 0
  • +

Replies To: cf chart not being displayed

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1919
  • View blog
  • Posts: 3,461
  • Joined: 13-January 08

Re: cf chart not being displayed

Posted 11 June 2012 - 06:17 AM

Hey rikkp.

Couple of thoughts. Have you tried doing a CFDUMP of the form scope first thing on your action page? You're doing a lot of setting of things in your array and referencing form variables you're assuming are there in your CFCHART call. If for whatever reason they're not there (or their values aren't something you expected) that could hose things.

Second idea: try building a parallel array with hard coded values (not using any form elements) and calling the CFCHART with hard coded values as well and see if that displays. If calling CFCHART and building the array with hard coded values fails then at least you can likely cross off that it's a form value issue.

Finally, what are you seeing for URLs that the red X images have? Is there any clue there?
Was This Post Helpful? 0
  • +
  • -

#3 rikkp  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 26-March 12

Re: cf chart not being displayed

Posted 11 June 2012 - 11:46 AM

Here is the URL that the image tag is attempting to reference.
http://backpacklab.c...ages/100013.JPG
I will do a CFDUMP and let you know what I get.

thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1