RE: Problems with CFGRAPH accuracy
I've not run into this here, but have had similar problems with other (non-CF) programs in the past. At a guess, I'd say that CFGRAPH is truncating the average, but it is being rounded when you display it. I'd calculate the value and store it with the correct number of significant digits in a variable somewhere rather than rely on CFGRAPH to round/truncate it properly. The other alternative (assuming I'm right about the cause) is to truncate the value when you display it. HTH. --Ben Doom Programmer & General Lackey Moonbow Software : -Original Message- : From: Rebecca _Becky_ Brewer [mailto:[EMAIL PROTECTED]] : Sent: Monday, September 30, 2002 12:08 PM : To: CF-Talk : Subject: Problems with CFGRAPH accuracy : : : Hi all, : : I'm having this fun problem with a CFGRAPH tag in CF 5 that's driving : me a bit crazy this morning. My code is calculating the sales average : for the users' state vs. the national sales average for the same time : period, and assigning these to local variables named #salesAvg# : and #allSalesAvg#. : : The problem is that the values displayed in my CFGRAPH image (using the : Flash format) and on the actual page do not match for the #allSalesAvg# : value. The graph is showing 78.26 (which is incorrect), but the text : label I have further down on the page is showing 78.27 (which is the : correct value). : : Has anyone had any similar problems with the accuracy of the CFGRAPH : tag? Any decent solutions to this, or am I better off hard-coding the : value for the national sales until we move up to CFMX and CFCHART-ing? : : TIA, : Becky : -- : Rebecca Brewer : Macromedia Certified ColdFusion 5.0 Developer : [EMAIL PROTECTED] - email : (866) 730-7225 - voicemail/fax : : : : : : : __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Problems with CFGRAPH accuracy
Stupid question rebecca, but I gather when calculating an average, that average doesn't exactly trim to two decimal places does it? Perhaps there is a rounding issue? And if you include a subject, you'd probably get a better response btw... -Original Message- From: Rebecca _Becky_ Brewer [mailto:[EMAIL PROTECTED]] Sent: Monday, September 30, 2002 9:08 AM To: CF-Talk Subject: Problems with CFGRAPH accuracy Hi all, I'm having this fun problem with a CFGRAPH tag in CF 5 that's driving me a bit crazy this morning. My code is calculating the sales average for the users' state vs. the national sales average for the same time period, and assigning these to local variables named #salesAvg# and #allSalesAvg#. The problem is that the values displayed in my CFGRAPH image (using the Flash format) and on the actual page do not match for the #allSalesAvg# value. The graph is showing 78.26 (which is incorrect), but the text label I have further down on the page is showing 78.27 (which is the correct value). Has anyone had any similar problems with the accuracy of the CFGRAPH tag? Any decent solutions to this, or am I better off hard-coding the value for the national sales until we move up to CFMX and CFCHART-ing? TIA, Becky -- Rebecca Brewer Macromedia Certified ColdFusion 5.0 Developer [EMAIL PROTECTED] - email (866) 730-7225 - voicemail/fax __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Problems with CFGRAPH accuracy
Hi all, I'm having this fun problem with a CFGRAPH tag in CF 5 that's driving me a bit crazy this morning. My code is calculating the sales average for the users' state vs. the national sales average for the same time period, and assigning these to local variables named #salesAvg# and #allSalesAvg#. The problem is that the values displayed in my CFGRAPH image (using the Flash format) and on the actual page do not match for the #allSalesAvg# value. The graph is showing 78.26 (which is incorrect), but the text label I have further down on the page is showing 78.27 (which is the correct value). Has anyone had any similar problems with the accuracy of the CFGRAPH tag? Any decent solutions to this, or am I better off hard-coding the value for the national sales until we move up to CFMX and CFCHART-ing? TIA, Becky -- Rebecca Brewer Macromedia Certified ColdFusion 5.0 Developer [EMAIL PROTECTED] - email (866) 730-7225 - voicemail/fax __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Problems with CFGRAPH accuracy
Hi all, I'm having this fun problem with a CFGRAPH tag in CF 5 that's driving me a bit crazy this morning. My code is calculating the sales average for the users' state vs. the national sales average for the same time period, and assigning these to local variables named #salesAvg# and #allSalesAvg#. The problem is that the values displayed in my CFGRAPH image (using the Flash format) and on the actual page do not match for the #allSalesAvg# value. The graph is showing 78.26 (which is incorrect), but the text label I have further down on the page is showing 78.27 (which is the correct value). Has anyone had any similar problems with the accuracy of the CFGRAPH tag? Any decent solutions to this, or am I better off hard-coding the value for the national sales until we move up to CFMX and CFCHART-ing? TIA, Becky -- Rebecca Brewer Macromedia Certified ColdFusion 5.0 Developer [EMAIL PROTECTED] - email (866) 730-7225 - voicemail/fax FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists