Author |
Topic  |
|
TonyGrayDSI
14 Posts |
Posted - 22 Apr 2005 : 13:38:31
|
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
|
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.
|
 |
|
TonyGrayDSI
14 Posts |
Posted - 22 Apr 2005 : 16:47:29
|
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 |
 |
|
quinncurtis
1164 Posts |
Posted - 22 Apr 2005 : 18:41:36
|
Sorry, but multi-line string axis labels are not supported in the WIN-VB-100 software. |
 |
|
|
Topic  |
|
|
|