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 Microsoft .Net & .Net Compact Framework
 Real-Time Graphics Tools for .Net (VB and C#)
 zooming
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wdahl99

10 Posts

Posted - 11 Mar 2005 :  14:33:32  Show Profile  Reply with Quote
I have a scrolling graph with 4 lines all on the same xaxis and timecoordinate. I coded a zoom button patterned after the StockDisplay example. When I click the zoom button the graph stops updating, but when I draw the zoom area nothing happens and I cannot see what is done wrong.
Any suggestions?

quinncurtis

1164 Posts

Posted - 11 Mar 2005 :  15:04:02  Show Profile  Reply with Quote
If you based your program on the RTStockDisplay example, then you have a ZoomWithStack class that inherits from ChartZoom. Place a breakpoint in the OnMouseDown event of the ZoomWithStack class. Do you you hit that breakpoint when you invoke zooming by click and dragging the mouse in the plot area ?
Go to Top of Page

wdahl99

10 Posts

Posted - 11 Mar 2005 :  15:58:11  Show Profile  Reply with Quote
i had tested that, and i do hit the breakpoint.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 11 Mar 2005 :  17:07:42  Show Profile  Reply with Quote
Show the code you use to setup the ZoomWithStack object and the code that executes in your equivalent of the zoomOn_Button_Click event.
Go to Top of Page

wdahl99

10 Posts

Posted - 14 Mar 2005 :  10:59:19  Show Profile  Reply with Quote
zoom with stack setup

zoomObj = new ZoomWithStack(chartVu, p1, true);
zoomObj.SetButtonMask(MouseButtons.Left);
zoomObj.SetZoomYEnable(true);
zoomObj.SetZoomXEnable(true);
zoomObj.SetZoomXRoundMode(ChartObj.AUTOAXES_FAR);
zoomObj.SetZoomYRoundMode(ChartObj.AUTOAXES_FAR);
zoomObj.SetEnable(false);
chartVu.SetCurrentMouseListener(zoomObj);
//set the zoom buttons
InitializeZoomButtons();

zoomOn_Button_Click

scroll1_.ScrollScaleModeX = ChartObj.RT_AUTOSCALE_X_MINMAX;
scroll1_.MaxDisplayHistory = (int)graphcounter_;
// Render graph based on new scale
// Update first, to display all historical information, then disable to allow for zooming.
this.UpdateDraw();
scroll1_.ChartObjEnable = ChartObj.OBJECT_DISABLE;
// Turn on zooming
zoomObj.SetEnable(true);

The one question I would ask is regarging the graphcounter_. I have 4 lines on 1 scrolling graph. I update the counter each time any of the lines updates a point, should I only update this counter for 1 of the points?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 14 Mar 2005 :  11:30:05  Show Profile  Reply with Quote
It looks like your counter should reflect the number of updates for the line that has had the maximum number of updates, not the sum of all updates for all lines.

We have to assume you've already done this and that did not fix the problem.

Otherwise we cannot see the problem based on the information provided. You need to concentrate on exactly how your program is different from our example program RTStockDisplay, on which your program is based.

In order to debug the program further we need a complete working program as a project, setup like our RTStockDisplay example program. Delete the projects \bin and \obj directories, zip the project folder and send it as an attachment to support@quinn-curtis.com. If we have a complete working example that we can debug in our offices we can always provide a solution.


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