Hi,

>From time to time we have noticed that when visiting the Farcry
administration home page, sometimes the "Object Age Breakdown" pie chart
spits the dummy with the error:

Error Occurred While Processing Request  
-1  
 
  
The error occurred in D:\WWW\applications\farcry_core\admin\home.cfm: line
132
Called from D:\WWW\applications\farcry_core\admin\home.cfm: line 105
Called from D:\WWW\applications\farcry_core\admin\home.cfm: line 32
Called from D:\WWW\applications\farcry_core\admin\home.cfm: line 1
Called from D:\WWW\applications\farcry_core\admin\index.cfm: line 162
Called from D:\WWW\applications\farcry_core\admin\index.cfm: line 1
 
130 :                                                   </cfif>
131 :                                           </cfloop>
132 :                                   </cfchartseries>
133 :                           </cfchart>
134 :                           <p></p>

I have cobbled together the following code which isolates the problem to
the values being past to the <cfchartseries> of type pie. One series of data 
labeled
"These values crash" will make the pie chart crash while the series
labelled "These values don't" allow the pie chart to work:

<cfinvoke component="#application.packagepath#.farcry.reporting" 
method="getAgeBreakdown" returnvariable="stAge">
                                        <cfinvokeargument name="breakdown" 
value="7,14,21"/>
                                </cfinvoke> 
                                
                                <cfdump var="#stAge#">
                                <!--- These values crash --->
                                <!--- <cfset stAge["14"] = 105>
                                <cfset stAge["21"] = 86>
                                <cfset stAge["7"] = 3037>                       
        
                                <cfset stAge[">21"] = 12165>  --->
                                
                                <!--- These values don't --->
                                <cfset stAge["14"] = 136>
                                <cfset stAge["21"] = 98>
                                <cfset stAge["7"] = 2645>
                                <cfset stAge[">21"] = 12430> 
                                
                                 
                                
                                <cfdump var="#stAge#">
                                
                                <cfoutput><span 
class="formTitle">#application.adminBundle[session.dmProfile.locale].objAgeBreakdown#</span><p
 style="margin-left: 5%;">
                                
                                <cfloop collection="#stAge#" item="i">
                                                        <!--- check if last 
segment ie > last defined date --->
                                                        <cfif not isNumeric(i)>
                                                                <cfset 
tD=application.rb.formatRBString(application.adminBundle[session.dmProfile.locale].numberDays,i)>
                                                                #td#1<br>
                                                                <!--- 
<cfchartdata item="#tD#" value=""> --->
                                                        <cfelse>
                                                                <cfset 
tD=application.rb.formatRBString(application.adminBundle[session.dmProfile.locale].numberlastDays,i)>
                                                                #td#2<br>
                                                                <!--- 
<cfchartdata item="#tD#" value="#stAge[i]#"> --->
                                                        </cfif>
                                                </cfloop>
                                
                                
                                <cfchart 
                                        format="flash" 
                                        chartHeight="100" 
                                        chartWidth="250" 
                                        scaleFrom="0" 
                                        showXGridlines = "no" 
                                        showYGridlines = "no"
                                        showBorder = "no"
                                        font="arialunicodeMS"
                                        fontsize="10" fontbold="no" 
fontitalic="no" 
                                        labelFormat = "percent"
                                        show3D = "yes" rotated="no" 
sortxaxis="yes"
                                        showLegend = "yes" 
                                        tipStyle = "MouseOver" showmarkers="no" 
pieslicestyle="solid">

                                        <cfchartseries type="pie" 
colorlist="##eeeeee,##483D8B,##778899,##aeaeae">
                                                
                                                <cfloop collection="#stAge#" 
item="i">
                                                        <!--- check if last 
segment ie > last defined date --->
                                                        <cfif not isNumeric(i)>
                                                                <cfset 
tD=application.rb.formatRBString(application.adminBundle[session.dmProfile.locale].numberDays,i)>
                                                                <cfchartdata 
item="#tD#" value="#stAge[i]#">
                                                        <cfelse>
                                                                <cfset 
tD=application.rb.formatRBString(application.adminBundle[session.dmProfile.locale].numberlastDays,i)>
                                                                <cfchartdata 
item="#tD#" value="#stAge[i]#">
                                                        </cfif> 
                                                </cfloop> 
                                        </cfchartseries> 
                                </cfchart>
                                </cfoutput>

I am assuming that perhaps this is an inherent problem with pie charts.

Therefore I am wondering:
a) Has come across this?
b) Are there limitiations to the values that can be passed to <cfchartseries> 
of type pie
b) Is there a solution to this problem?

The obvious solution that comes to mind for me is to change the chart type
to bar or something similar.

Regards,
Franko

---
You are currently subscribed to farcry-dev as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to