Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Windows
 Charting and Real-Time Graphics Tools for Windows
 WGAutoAxes and axis endpoints
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

TonyGrayDSI

14 Posts

Posted - 22 Apr 2005 :  13:38:31  Show Profile  Reply with Quote
I'm a new user and still getting familiar with the feature set of the Charting Tools for Windows. WGAutoAxes does 95% of what I want, but I don't want the X axis labels to be applied. Everything else, (scaling, tick size and so on) is perfect. I want to either
1)find out how to relabel the X axis ticks after AutoAxis has been called (I find that if I just call WGLabelAxisStringsVB that the desired labels are written over the unwanted ones which still show through) or
2) if I can't do that, how can I get the automatic scaling, intercept and endpoint assignment values found by AutoAxis to feed into the manual axis drawing routines. I found GetMinMax for X and Y, but how do I get AutoAxis' endpoint and tick spacing selections?

Any clues?
Thanks,
Tony.

quinncurtis

1164 Posts

Posted - 22 Apr 2005 :  16:03:48  Show Profile  Reply with Quote
You should be able to disable the x-axis labels using the WGShowObject method. Just pass in the handle of the x-axis labels object that can be returned by the WGAutoAxes function.

Private Sub DrawP1G1(pGrDesc As Long, hdc As Long)
Dim hObj As Long, success As Long
Dim hAxisX As Long, hAxisY As Long
Dim hAxisXLab As Long, hAxisYLab As Long
Dim hDataSet As Long
.
.
.
success = WGAutoAxes(pGrDesc, hdc, hDataSet, AS_ROUNDCLOSE, INTF_ZERO, hAxisX, hAxisY, hAxisXLab, hAxisYLab )

Call WGShowObject(pGrDesc, hAxisXLab, False)
.
.
.


Then use the WGLabelAxisStringsVB fucntion that you have already figured out how to use. The first set of x-axis labels will be disabled, leaving only the ones you want.



Go to Top of Page

TonyGrayDSI

14 Posts

Posted - 22 Apr 2005 :  16:47:29  Show Profile  Reply with Quote
That worked beautifully, thanks. I had copied the call to WGAutoAxes from some sample code where the last two params were passed in as False, so I hadn't realized that the axis label handles are also returned by that function.

BTW, is there any way to get tick labels that are two lines high? I am plotting an encoded nominal value and I want to show both the numerical value and the associated name by the tick, on two rows. For example, 1=coke,2=pepsi,3=rc cola, each tick shows the number, and then centered below that label is the text equivalent on a second row of labels.

Thanks,
Tony
Go to Top of Page

quinncurtis

1164 Posts

Posted - 22 Apr 2005 :  18:41:36  Show Profile  Reply with Quote
Sorry, but multi-line string axis labels are not supported in the WIN-VB-100 software.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07