User (Legacy) Posted February 28, 2003 Report Share Posted February 28, 2003 Hi I am trying to force the Y Axis to keep drawing to the next major tick point. For example , In the graph I have supplied at the top I want the Y Axis to keep drawing upto the major tick of 700. Is there a way I can set this? The auto scale and tick currently on. Thanks Chris Link to comment Share on other sites More sharing options...
Software FX Posted February 28, 2003 Report Share Posted February 28, 2003 The Max value of this chart is less than 700, that's why you don't see 700. You can set the Max = 700 if you want by doing: Chart.Axis(AXIS_Y).Max = 700 -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 28, 2003 Author Report Share Posted February 28, 2003 I know I can set this but I have a large set of data values and users can interact dynamically with that data (using ChartFX internet). The max value is only 700 in this single case but I want to make the graph extend to the next step value and draw that on the Y axis not matter what the datasets maxvalue is. I could find some rounding method for the values and manually work it out (not sure how yet) but I would be nice for it to be automated. Can it be done by ChartFX internet? Thanks Chris "SoftwareFX Support" <support@softwarefx.com> wrote in message news:RBQ0orz3CHA.3068@webserver1.softwarefx.com... > The Max value of this chart is less than 700, that's why you don't see 700. > You can set the Max = 700 if you want by doing: > > Chart.Axis(AXIS_Y).Max = 700 > > -- > FP > Software FX, Inc. > > Link to comment Share on other sites More sharing options...
Software FX Posted February 28, 2003 Report Share Posted February 28, 2003 The thing is this, we do adjust the scale to the next "round" number when you call AdjustScale (or CloseData) but we only go up to 10% more. So if your largest value is 680 you will get 700 as the max but if your value is 610 you wont (90 is more than 10 percent of 610). We do this to prevent excessive waste of space, which is what most people want in our experience. You can do your own rounding algorithm if you want to go beyond this barrier (10%). To round it you can do: Dim d As Double d = ChartFX1.Axis(AXIS_Y).Max - ChartFX1.Axis(AXIS_Y).Min Dim nDigits As Integer nDigits = Int(Log(d) / Log(10)) Dim dPow As Double dPow = 10 ^ nDigits ChartFX1.Axis(AXIS_Y).Max = Int((ChartFX1.Axis(AXIS_Y).Max / dPow) + 0.99) * dPow -- FP Software FX, Inc. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.