Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 Real-Time Graphics Tools for .Net (VB and C#)
 ScrollFrame y-axis auto-scaling

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

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

* Forum Code is ON
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
mswlogo Posted - 06 Jun 2007 : 12:17:10
I have a RT Graph setup as follows

mScrollFrame = new RTScrollFrame(this, mDataset, mTransform, ChartObj.RT_FIXEDEXTENT_MOVINGSTART_AUTOSCROLL);
mScrollFrame.ScrollScaleModeY = ChartObj.RT_AUTOSCALE_Y_MINMAX;

Is there a way I can have the Y Auto scale to ALL the data rather than just the current extent.

It's really kind of useless the way it is. And I don't see a way around it. Because we have a slightly noisy signal coming in and the user wants to observe it's overall strength. But it always a wiggly line through the middle. To see it's strength the user has to read the scale. But the purpose of the chart is to give the user a graphical feeling of the data. If the user has to read the scale I could just display a windowed average value (no chart).

Even in your little NASDAQ Icon in this forum I see a chart with large fluctuation. But I have to read the scale to know that it's varying very little. Sometimes you want to show small changes and sometimes you want to show large relative changes.

Also when scrolling back through the data I'd like to show the full scale of the data ideally. But even as is with the extent auto scale I'm having trouble getting it to reautoscale on the extent when the user manually scrolls back. But this is not an issue if I could get full scale Y of all data all the time. In realtime mode and manual scrolling.
6   L A T E S T    R E P L I E S    (Newest First)
mswlogo Posted - 06 Jun 2007 : 15:15:21
It worked had to recalc Axis too.

public void AddDataPoint(long acquisitionNumber, double totalIonCurrent)
lock (mDataset)
mDataset.SetCurrentValue((double)acquisitionNumber, totalIonCurrent);

if (myMin > totalIonCurrent)
myMin = totalIonCurrent;

if (myMax < totalIonCurrent)
myMax = totalIonCurrent;

if ((mScrollFrame.ChartObjScale.ScaleStartY != myMin) || (mScrollFrame.ChartObjScale.ScaleStopY != myMax))
mScrollFrame.ChartObjScale.ScaleStartY = myMin;
mScrollFrame.ChartObjScale.ScaleStopY = myMax;
quinncurtis Posted - 06 Jun 2007 : 14:33:40
Thank you for your suggestion. We will add it to the list of new features to consider in future revisions. If you would like to have that feature added immediately to the software, contact our special services group at sales@quinn-curtis.com and they will give you a quote.
mswlogo Posted - 06 Jun 2007 : 14:23:06
Thanks !!! I'll give it a whirl.

It would be nice to add RT_AUTOSCALE_Y_MINMAX_FULLDATASET. Or perhaps a seperate option because it could be used in combination with several of the AUTOSCALE_Y options.

There are certainly applications where what you have makes sense. But I think there are just as many you want full auto scale.

For us all it ever shows is the noise at that level unless it just transitioned. But once the transition is out of the extent it jumps back to noise again. Looks the same if it's high or low.

n/a Posted - 06 Jun 2007 : 13:01:09
I don't agree with your premise that the current ScrollFrame auto-scaling mode is useless. My long experience shows that the way it is implemented is what most programmers want.

You can implement what you describe easily enough. Turn off the auto-y scaling of the scroll frame.

scrollFrame.ScrollScaleModeY = ChartObj.NO_AUTOSCALE;

Then keep track of the maximum y-value you want the y-scale to auto-scale against, probably in the routine you use to update the RTProcessVar objects.

private void timer1_Tick(object sender, System.EventArgs e)
  if (this.IsDesignMode) return;			
// Random data
  currentTemperatureValue1 += 5 * (0.5 - ChartSupport.GetRandomDouble());

  // maxy is a double global to the entire class
  maxy = Math.Max(currentTemperatureValue1, maxy);

  // This method uses the default time stamp, which is the current time-of-day


Then, if the ymax value changes, adjust the y-scale and axes each time you do an update.

private void timer2_Tick(object sender, System.EventArgs e)
  if (this.IsDesignMode) return;			
  if (scrollFrame.ChartObjScale.ScaleStopY != maxy)
    scrollFrame.ChartObjScale.ScaleStopY = maxy;

You can make it fancier by tracking more variables, but the concept is the same.
mswlogo Posted - 06 Jun 2007 : 12:57:40
FYI, Strange I can edit my reply but I can't edit my initial post.
mswlogo Posted - 06 Jun 2007 : 12:54:37
FYI: I could not edit my own post for some reason. I forgot to finish subject line.

Anyway regarding the last part of my question I got manual scrolling to do full scale. Still can't get full scale on real time updates in RT_FIXEDEXTENT_MOVINGSTART_AUTOSCROLL mode.

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