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: <input name="xAxis" type="text" /><br /> Y Aaxis Title: <input name="yAxis" type="text" /><br /> x Axis 1: <input type="text" name="source1"> yAxis 1 value: <input type="text" name="s1val" size="6"> x Axis 2: <input type="text" name="source2"> yAxis 2 value: <input type="text" name="s2val" size="6"> x Axis 3: <input type="text" name="source3"> yAxis 3 value: <input type="text" name="s3val" size="6"> x Axis 4: <input type="text" name="source4"> yAxis 4 value: <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.

New Topic/Question
Reply




MultiQuote




|