Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Graph Axis
Message
 
 
To
20/04/2005 14:22:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01006665
Message ID:
01006762
Views:
15
This message has been marked as the solution to the initial question of the thread.
Tom,

log10() can help you in this case. You can use that to get order of magnitude and then round up or down to some number of decimal places, then take 10^ that power to get your limit.

>I am writing a custom class to handle the dynamic generation of a line graph from data in a cursor. As you can imagine, I need to find the max and min values but what if they stop at an odd level?
>
>For instance what if I have a max value of 21.34. I suppose I could use the CEILING() function to raise to the next highest integer of 22 but what if instead that value was .2134 - I do not want to jump all the way up to 1.00. Even on the first example, perhaps 21.50 is a better upper limit but how can this be handled generically?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform