User (Legacy) Posted November 19, 2001 Report Share Posted November 19, 2001 Hi I have encountered a strange problem and any points to its resolution will be gratefully appreciated. I have auto scale of chart fx client server on for one chart I set data to the chart and get the following max and min just before and after the closedata method: Before: Max: 179155.827392191 Min: -8887.94238969404 After: Max: 200000 Min: -100000 For another set of data I get Before: Max: 162577.227222706 Min: -5637.20400744025 After: Max: 170000 Min: -10000 Why doesn't the first min round to -10 000 but to -100 000 unlike the second chart? thanks -- ____________________________________ Paul Nailand Visual Risk Pty Ltd www.visualrisk.com +61 (2) 9388 1370 +61 (0) 413 002 802 This email and any attachments is intended only for the person to whom it is addressed. It may contain confidential information. If you receive this document in error, please immediately delete it from your system and notify the sender. You must not disclose, copy, use or rely on any part of this document if you are not the intended recipient. Quote Link to comment Share on other sites More sharing options...

Software FX Posted November 20, 2001 Report Share Posted November 20, 2001 I took me some time to realize what was happening here, I first though it was a bug but this turned out to be false. Here is what's happening: To determine de magnitude of your scale we take log(Max-Min) This us the number of digits of your range, we then round your Min and Max to a multiple of this power of ten. However, we have a limit, if the change represents more than 10% of the scale, we round to the immediately lower power of 10. For the data you are mentioning: log(Max-Min) = 5 Therefore Chart FX is going to try to round to a multiple of 100,000, however, for the second set of data (-5637.20400744025 to 162577.227222706), since it is smaller, the 10% condition kicks in and therefore the Min and Max are now rounded to 10,000. So although it looks weird, it is doing it right, the reason for the 10% condition is to prevent the scale from growing to a point where there is too much unused space. -- FP Software FX, Inc. Quote Link to comment Share on other sites More sharing options...

User (Legacy) Posted November 21, 2001 Author Report Share Posted November 21, 2001 Hi what does 10% of the scale mean. is there a default number of steps that chartfx tries to create if step has not been set thanks Paul > I took me some time to realize what was happening here, I first though it > was a bug but this turned out to be false. Here is what's happening: > > To determine de magnitude of your scale we take > > log(Max-Min) > > This us the number of digits of your range, we then round your Min and Max > to a multiple of this power of ten. > > However, we have a limit, if the change represents more than 10% of the > scale, we round to the immediately lower power of 10. > > For the data you are mentioning: > > log(Max-Min) = 5 > > Therefore Chart FX is going to try to round to a multiple of 100,000, > however, for the second set of data (-5637.20400744025 to 162577.227222706), > since it is smaller, the 10% condition kicks in and therefore the Min and > Max are now rounded to 10,000. > > So although it looks weird, it is doing it right, the reason for the 10% > condition is to prevent the scale from growing to a point where there is too > much unused space. > > -- > FP > Software FX, Inc. > > Quote Link to comment Share on other sites More sharing options...

Software FX Posted November 27, 2001 Report Share Posted November 27, 2001 10% is an arbitrary number. We decided it was too much to increase the scale more than 10% only to make the Min and Max rounder. This 10% is constant and can not be changed. You can always set the Min and Max manually if you want a different calculation. -- FP Software FX, Inc. Quote Link to comment Share on other sites More sharing options...

## Recommended Posts

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Note:Your post will require moderator approval before it will be visible.