Adam, If you are getting your graphing info from a DB, you could get the max value of the resultset and add to it to X to get the next value of 10 (or 100 or 1000). So max value of 121, you would want 130....578 -> 580, etc... That would be your "scaleto" value.
Here's a UDF to help you out... http://www.cflib.org/udf.cfm?ID=613 Then divide that number by 10 (or 100 or 1000) and that would be your gridlines value. Maybe that will get you started. HTH, Ryan -----Original Message----- From: Adam Reynolds [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 5:07 AM To: CF-Talk Subject: Graphing under MX Hi all, I was wondering if somebody had come up with a formula for determining how to get cfchart to display a good Y axis? What I mean is that if you define: scalefrom scaleto gridlines There should be a way to determine the correct set of points along the y axis. Currently I have gridlines set to 5. So on a scale range of 20 - 80 you get 5 markes, effectively the quartile positions at: 20 35 50 65 80 What I ultimately want is not to do it this way I want to determine the scale and set it to 20 30 40 50 60 70 80 Its kinda doing my head in. Maybe I am not thinking about this correctly. Adam ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4