End Google Ads 201810 - BS.net 01 --> I'm having an issue with the zoom method of NTGraph. Basically the code is as follows:

void CPlot1To1NBBBRSvsIL::OnZoomIn()
{
m_Graph.AutoZoomIn(0.0);
}

void CPlot1To1NBBBRSvsIL::OnZoomOut()
{
m_Graph.AutoZoomOut (0.0);
}

Where when I step into the function during debug it goes into NTGraph.cpp at

void CNTGraph::AutoZoomIn(double zoomPercent)
{
static BYTE parms[] =
VTS_R8;
InvokeHelper(0x53, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
zoomPercent);
}

void CNTGraph::AutoZoomOut(double zoomPercent)
{
static BYTE parms[] =
VTS_R8;
InvokeHelper(0x54, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
zoomPercent);
}

The problem is that I do not know what the default zoomPercent is, when I watch the variable it is set to 0.0, but if I change it to

m_Graph.AutoZoomOut (50.0);

It ceases to zoom at all, where it previously would zoom an unknown amount. I've also tried using

m_Graph.SetAutoZoomPercentage(50);

For both ways I tried using various numbers between 200 and .01 as I was not sure if it was truly in percentage format, but this did not make any difference.

Please let me know if you can tell me how the zoom function works and by what percent it goes by (in x and y), the goal being to create some code to reformat the y-axis upon zooming, which currently seems to be faulty if zoomPercent is left at 0.0.

It might be worth noting that upon zooming out, the y axis does indeed adjust accordingly, it's only zoomin thats a problem...

Thank you for your time,
KevinVS

modified on Friday, June 26, 2009 10:42 AM