
graph.vbx and setting my own x axis values
Quote:
> I have been trying to use the GRAPH.VBX component in VB and am trying
> to plot a curve with the X axis values going from 5000 to 7000. The X
> values labels go from 0 to 8000 and I haven't been able to find a way
> to override this. Any ideas would be appreciated. Or the
> recommendation of another graph VBX/OCX would be desired.
> Bernie Borenstein
> Douglas Aircraft
I'm not sure what you are doing, but I have been working with the
graph.vbx lately and have gotten some insight. If you are trying to put
labels on the X axis you need to use the LabelText property. Set
ThisPoint to the point you want the label to appear, and set
graph.LabelText = "label".
for i = 0 to graph.NumPoints step <how close you want the labels to be>
graph.ThisPoint = i
graph.LabelText = cstr(<label value>)
next i
If you use the same graph several times without unloading it you will
need to clear the graph data and label data in between uses. Just make a
loop to step through all the ThisPoint's and set them to null. That is a
good place to use AutoInc.
Good Luck
Bill Gill