Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 Real-Time Graphics Tools for .Net (VB and C#)
 RescaleAxesToCurrentTransform - changed behavior?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
findejs Posted - 18 Apr 2006 : 12:59:46
I need to rescale RT scrolling graph in my project. I'm doing it in this way:
Frame.ScrollScaleModeY = GraphObj.RT_NO_AUTOSCALE_Y;
Transform.ScaleStartY = LowRange;
Transform.ScaleStopY = HighRange;
Frame.RescaleAxesToCurrentTransform();

Unfortunatelly, the axes are not rescaled as I expected; the axes are painted outside the transform. I recompiled the Polygraph example to check what is wrong, but the Polygraph example has the same incorrect behavior. The original demo, still available on QC web site, works OK. I'm using QCRTGraphNet.dll version 1.6.1.2.
Is it feature or bug? And if it is feature how to achieve the original behavior with the current libraries?
Thanks.
3   L A T E S T    R E P L I E S    (Newest First)
findejs Posted - 19 Apr 2006 : 03:03:33
The CalcAutoAxis() method is what I need, because I have to change transform scale manually.
BTW, it is neccessary to call RescaleAxesToCurrentTransform() if the CalcAutoAxis() must be also called?
quinncurtis Posted - 18 Apr 2006 : 17:09:45
It turns out that the Polygraph example program was not updated for a change make in the RescaleAxesToCurrentTransform.

We decided that if the scroll frame had the ScrollScaleModeY set to RT_NO_AUTOSCALE_Y, that NO re-scale of the axis should take place, because a re-scale would change the axis tick mark parameters if the programmer initially chose tick mark parameter values different than our default auto-axis routine chooses.

If you want the axes to track the transform when RescaleAxesToCurrentTransform is called, you must set the ScrollScaleModeY property to RT_AUTOSCALE_Y.

Frame.ScrollScaleModeY = GraphObj.RT_AUTOSCALE_Y;

This has the side affect of causing the y-axis to rescale to match the y-data range whenever the scroll frame is updated which is probably what you want anyway.

But just in case you want to use RT_NO_AUTOSCALE_Y, you can just add a call to the axis CalcAutoAxis property after you call RescaleAxesToCurrentFrame, as the code below, a modified method from our Polygraph example program.

		
private void voiceStressGainTrackBar_Click(object sender, System.EventArgs e)
{
  double newgainvalue = voiceStressGainTrackbar.RTValue;
  voiceStressScrollFrame.ChartObjScale.ScaleStartY = 0;
  voiceStressScrollFrame.ChartObjScale.ScaleStopY = newgainvalue;
  // Rescale axes to match new scale
  voiceStressScrollFrame.RescaleAxesToCurrentTransform();
// Left axis
  yaxis51.CalcAutoAxis();
//Right axis
  yaxis52.CalcAutoAxis();
// Must re-establish the x-intercept of the right y-axis
  yaxis52.AxisIntercept = voiceStressScrollFrame.ChartObjScale.ScaleMaxX;
  this.UpdateDraw();
}


quinncurtis Posted - 18 Apr 2006 : 16:55:41
We do see something wrong if you use the track bars on the right to adjust the range for one of the graphs. Is this what your are referring to?

Seems like a signficant bug so we will have to resolve it and update the libraries.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07