Author |
Topic  |
|
wdahl99
10 Posts |
Posted - 11 Mar 2005 : 14:33:32
|
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
|
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 ? |
 |
|
wdahl99
10 Posts |
Posted - 11 Mar 2005 : 15:58:11
|
i had tested that, and i do hit the breakpoint. |
 |
|
quinncurtis
1164 Posts |
Posted - 11 Mar 2005 : 17:07:42
|
Show the code you use to setup the ZoomWithStack object and the code that executes in your equivalent of the zoomOn_Button_Click event.
|
 |
|
wdahl99
10 Posts |
Posted - 14 Mar 2005 : 10:59:19
|
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?
|
 |
|
quinncurtis
1164 Posts |
Posted - 14 Mar 2005 : 11:30:05
|
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.
|
 |
|
|
Topic  |
|