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#)
 Multiple auto scaling y-axes

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
Solar Posted - 25 Aug 2011 : 09:07:08
im working on a real time graph with four y-axes, two on either side of the plot window. All four can be individually set to auto or manual scale. I set the transform to CartesianCoordinates and used SetAxisIntercept for positioning the far left and right y-axes. The scroll frames and polt lines are using a seperate TimeCoordinates transform. This all works well for manual scale. In auto the plot lines scale correctly but the y-axes do not. I use the ChartObj.RT_AUTOSCALE_Y_MINMAX for the RTScrollFrame. I assume tihs happens because the y-axes are on different transforms
then the scroll frame. If I put these axes on a TimeCoordinates transform along with the scroll frame, SetAxisIntercept does not work. When I put the scroll frame and axes on different TimeCoordinates transforms and adjust the SetGraphBorderDiagonal for positioning the axes the plot lines shift over along with the axes.

Thanks
5   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 31 Aug 2011 : 15:08:22
A more general way to calculate the offset is to use AxisMin and AxisMax to calculate the axis extent:

// AxisMin and AxisMax are already in milliseconds
double offset =((xAxis1.AxisMax - xAxis1.AxisMin)/ 10)
yAxis3.SetAxisIntercept(xAxis1.AxisMin - offset);

The one to the right would be
yAxis4.SetAxisIntercept(xAxis1.AxisMax + offset);
Solar Posted - 31 Aug 2011 : 14:48:25
Problem solved. Thanks for the help.
quinncurtis Posted - 25 Aug 2011 : 14:14:46
So, you are saying that this has nothing to do with a scroll frame -correct. It is in the initial setup of the y-axes.

Time values can also be specified using millisecond numeric values. So you must specify a value which is to the left or right of AxisMax or AxisMin.

So if your time axis has an extent of 60 seconds, and you want the offset y-axis about 10% to the left of the AxisMin y-axis, use:

// offset in milliseconds
double offset = 1000 * (60 / 10)
yAxis3.SetAxisIntercept(xAxis1.AxisMin - offset);

The one to the right would be
yAxis4.SetAxisIntercept(xAxis1.AxisMax + offset);

The actual values will depend on your actual graph. But you should get the idea.



Solar Posted - 25 Aug 2011 : 13:06:12
There are four seperate scroll frames and four seperate transforms. All of the transforms have the same positioning rectangle coordinates. two of the y-axes are positioned using xaxis.AxisMax and xaxis.AxisMin. The problem im running into is positioning the other two next to the first two. when I use SetAxisIntercept the axis Disappears. I used the same SetAxisIntercept coordinate with a CartesianCoordinates transform and the axes where right where I wanted them. What is the best way to position y-axes on a TimeCoordinates transform that wont be on xaxis.AxisMax or xaxis.AxisMin.

Thanks
quinncurtis Posted - 25 Aug 2011 : 09:49:49
A RTScrollFrame can only manage one coordinate system.
Every coordinate system (you have 4 since you have four different y-axes) must use a separate RTScrollFrame. It is not clear if that is what you are doing. See the example RTStockDisplay for an example which uses two RTScrollFrames for two overlaid coordinate systems, with a y-axis on the left and right, and with RT_AUTOSCALE_Y_MINMAX set for both.

Every overlaid coordinate system must use the same positioning rectangle - SetGraphBorderDiagonal. Once you have that setup don't change it.

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