Discussion:
cfchart issues from 7 to 8
(too old to reply)
dg00
2009-03-30 16:58:28 UTC
Permalink
For the past couple of months I have been working in a sandbox environment
running cf7. I am working on a dashboard component for monitoring several file
counts on various servers within the network.

I am displaying the data as a stacked chart. The data is called through a few
invoke/component scripts.

The structure for the charts I am using is as follows...

Now, on CF7 this displays as two columns, with two bars stacked on top of each
other with the correct values replacing the var#'s.

I moved the script to a new CF8 box, and the graph doesn't function as it did
previously. No code changes have been made...on the CF8 box the two columns are
still there, but there would be 4 bars stacked on each other, and both columns
would have the same values.

Example:
var1 = 1
var2 = 2
var3 = 3
var4 = 4

CF7 Graph Output:
Column1 stacked with var1(1) and var2(2) with a total column value of 3.
Column2 stacked with var3(3) and var4(4) with a total column value of 7.

CF8 Graph Output:
Column1 stacked with var1(1), var2(2), var3(3), var(4) with a column value of
10.
Column1 stacked with var1(1), var2(2), var3(3), var(4) with a column value of
10.

Any ideas? The examples are pretty basic, but due to privacy policies I can't
share the exact code...nothing really sensitive but that's just how it is.

Thanks in advance.

<cfchart etc...>
<cfchartseries ...>
<cfchartdata item="Data1" value="#var1#">
</cfchartseries>
<cfchartseries ...>
<cfchartdata item="Data1" value="#var2#">
</cfchartseries>

<cfchartseries ...>
<cfchartdata item="Data2" value="#var3#">
</cfchartseries>
<cfchartseries ...>
<cfchartdata item="Data2" value="#var3#">
</cfchartseries>
</cfchart>
Azadi
2009-03-31 06:51:38 UTC
Permalink
<cfchart etc...>
<cfchartseries ...>

what you have hidden behind ... there is likely important in your issue
- post it all pls.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
dg00
2009-03-31 15:30:02 UTC
Permalink
I have removed the names of boxes/ip's for obvious reasons and replaced them
with XXXX. Also, this is a bit sloppy of code because I'm just trying to get it
working properly on cf8 (i.e. the randomly placed cfdumps) I'm a PHP coder but
this project they required CF so that explains the sad attempt below...thanks
for the help.

<!--- Real Time Folder Readings --->
<cfset ydate = CreateDate(year(now()),month(now()),day(now()-1))/>
<cfif StructKeyExists(URL,"sDate")><cfset sInDate = URL.sDate /><cfelse><cfset
sInDate="#DateFormat(ydate, "mm/dd/yyyy")#"></cfif>
<cfif StructKeyExists(URL,"eDate")><cfset eInDate = URL.eDate /><cfelse><cfset
eInDate="#month(now())#/#day(now())#/#year(now())#"></cfif>
<cfif Minute(now()) gt 0 and Minute(now()) lt 15><cfset tMin = "00" />
<cfelseif Minute(now()) ge 15 and Minute(now()) lt 30><cfset tMin = "15" />
<cfelseif Minute(now()) ge 30 and Minute(now()) lt 45><cfset tMin = "30" />
<cfelseif Minute(now()) ge 45 and Minute(now()) lt 60><cfset tMin = "45" />
</cfif>

<cfif Hour(now()) lt 10><cfset tHour = "0" & Hour(now()) />
<cfelse><cfset tHour = Hour(now()) />
</cfif>

<cfif StructKeyExists(URL,"sTime")><cfset sInDate = sInDate & " " &
sTime><cfelse>
<cfset sInDate = sIndate & " " & tHour & ":" & tMin & ":00">
</cfif>
<cfif StructKeyExists(URL,"eTime")><cfset eInDate = eInDate & " " &
eTime><cfelse>
<cfset eInDate = eIndate & " " & tHour & ":" & tMin & ":00">
</cfif>
<!--- Calls for SMTP Counts--->
<cfset smtpbounce = 0 />
<cfset smtppending = 0 />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\mailroot\Badmail\" aStartDate="#sInDate#"
aEndDate="#eInDate#" aFilterType="*.BAD" returnvariable="result"></cfinvoke>
<cfset smtpbounce = smtpbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\mailroot\Queue\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.EML" returnvariable="result"></cfinvoke>
<cfset smtppending = smtppending + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\mailroot\Drop\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*" returnvariable="result"></cfinvoke>
<cfset smtpbounce = smtpbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\mailroot\Pickups\" aStartDate="#sInDate#"
aEndDate="#eInDate#" aFilterType="*" returnvariable="result"></cfinvoke>
<cfset smtppending = smtppending + result />
<!--- End of SMTP Calls --->

<!--- Calls to iMail Folders --->
<cfset imailbounce = 0 />
<cfset imailhbounce = 0 />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="Q*" returnvariable="result"></cfinvoke>
<cfset imailbounce = imailbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="R*" returnvariable="result"></cfinvoke>
<cfset imailbounce = imailbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.smp" returnvariable="result"></cfinvoke>
<cfset imailbounce = imailbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.smd" returnvariable="result"></cfinvoke>
<cfset imailbounce = imailbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.gsc" returnvariable="result"></cfinvoke>
<cfset imailhbounce = imailhbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.gse" returnvariable="result"></cfinvoke>
<cfset imailhbounce = imailhbounce + result />
<!--- End of iMail Folders --->

<!--- Grab from the bounce table in the SPSS_MktgPrefs DB --->
<cfinvoke component="opt.components.dashboard" method="getOptOutPending"
aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qPending"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getOptOutActive"
aStartDate="#sInDate#" aEndDate="#eInDate#" returnvariable="qActive"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="0"
aCategoryId="1" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qHardBounce"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="0"
aCategoryId="2" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qSoftBounce"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="16"
aCategoryId="3" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qOptOutBounce"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="64"
aCategoryId="3" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qAutoResponderBounce"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="0"
aCategoryId="3" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qOtherBounce"></cfinvoke>
<!--- End of Real Time Calls --->

<!--- Grab Aprimo Pending Emails --->
<cfinvoke component="opt.components.dashboard" method="getAprimoPending"
aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qAprimoPending"></cfinvoke>
<cfif qAprimoPending.RecordCount eq "">
<cfset aprimocount = 0>
<cfelse>
<cfset aprimocount = qAprimoPending.RecordCount>
</cfif>
<!--- End call for Aprimo Emails --->


<!--- Total Bounce Counts --->
<cfif qPending.mkpendingCount eq "">
<cfset ppcount = 0 />
<cfelse>
<cfset ppcount = qPending.mkpendingCount />
</cfif>
<cfif qActive.mkactiveCount eq "">
<cfset aacount = 0 />
<cfelse>
<cfset aacount = qActive.mkActiveCount />
</cfif>
<cfif qHardBounce.bouncesCount eq "">
<cfset hbcount = 0 />
<cfelse>
<cfset hbcount = qHardBounce.bouncesCount/>
</cfif>
<cfif qSoftBounce.bouncesCount eq "">
<cfset sbcount = 0 />
<cfelse>
<cfset sbcount = qSoftBounce.bouncesCount/>
</cfif>
<cfif qOptOutBounce.bouncesCount eq "">
<cfset oocount = 0 />
<cfelse>
<cfset oocount = qOptOutBounce.bouncesCount/>
</cfif>
<cfif qAutoResponderBounce.bouncesCount eq "">
<cfset arcount = 0 />
<cfelse>
<cfset arcount = qAutoResponderBounce.bouncesCount/>
</cfif>
<cfif qOtherBounce.bouncesCount eq "">
<cfset otcount = 0 />
<cfelse>
<cfset otcount = qOtherBounce.bouncesCount - (oocount + arcount) />
</cfif>

<cfinvoke component="opt.components.dashboard" method="getSMTPSend"
aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qSmtpCount"></cfinvoke>
<cfif qSmtpCount.sendCount eq "">
<cfset sendcount = 0 />
<cfelse>
<cfset sendcount = qSmtpCount.sendCount />
</cfif>

<p>Email Statistics For <span id="stt"><cfoutput>#sInDate#</cfoutput></span>
Through <span id="stt"><cfoutput>#eInDate#</cfoutput></span></p>
<ul>
<li>
<cfdump var="#aprimocount#">
<cfdump var="#smtpbounce#">
<cfdump var="#smtppending#">
<cfdump var="#imailbounce#">
<cfdump var="#imailhbounce#">
<cfdump var="#hbcount#">
<cfdump var="#sbcount#">
<cfdump var="#oocount#">
<cfdump var="#arcount#">
<cfdump var="#otcount#">
<cfdump var="#aacount#">
<cfdump var="#ppcount#">
<cfdump var="#sendcount#">
<cfchart format="flash" xaxistitle="Sources" yaxistitle="Quantities"
scaleFrom="0" gridlines="5" show3d="yes" showlegend="no"
seriesplacement="stacked" chartwidth="600" chartheight="450">

<cfchartseries type="bar" serieslabel="Pending" seriescolor="##009900">
<cfchartdata item="Aprimo Emails" value="#aprimocount#">
</cfchartseries>

<cfchartseries type="bar" serieslabel="Hard Bounce" seriescolor="##CC0000">
<cfchartdata item="Microsoft Emails" value="#smtpbounce#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Pending" seriescolor="##009900">
<cfchartdata item="Microsoft Emails" value="#smtppending#">
</cfchartseries>

<cfchartseries type="bar" serieslabel="Hard Bounces" seriescolor="##CC0000">
<cfchartdata item="iMail Emails" value="#imailhbounce#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Pending" seriescolor="##009900">
<cfchartdata item="iMail Emails" value="#imailbounce#">
</cfchartseries>

<cfchartseries type="bar" serieslabel="Hard Bounces"
seriescolor="##CC0000">
<cfchartdata item="Bounces/Opt-Outs" value="#hbcount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Soft Bounces"
seriescolor="##FF6600">
<cfchartdata item="Bounces/Opt-Outs" value="#sbcount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Opt Bounces" seriescolor="##000000">
<cfchartdata item="Bounces/Opt-Outs" value="#oocount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Auto Responder Bounces"
seriescolor="##000066">
<cfchartdata item="Bounces/Opt-Outs" value="#arcount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Other Bounces"
seriescolor="##66FFCC">
<cfchartdata item="Bounces/Opt-Outs" value="#otcount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Active" seriescolor="##000000">
<cfchartdata item="Bounces/Opt-Outs" value="#aacount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Pending" seriescolor="##009900">
<cfchartdata item="Bounces/Opt-Outs" value="#ppcount#">
</cfchartseries>

<cfchar
dg00
2009-04-01 20:24:13 UTC
Permalink
I've included an image to show exactly what is happening with the code. Some help would be greatly appreciated.
Loading Image...

Loading...