Linking axes data together

TeeChart for ActiveX, COM and ASP
Post Reply
BWThorp
Newbie
Newbie
Posts: 8
Joined: Fri Apr 02, 2004 5:00 am

Linking axes data together

Post by BWThorp » Wed Nov 03, 2004 8:38 pm

Hello,

I have a graph that contains two series - each one is a line graph. I am graphing altitude and time on the left and bottom axes respectively. I am also graphing the speed and distance on the right and top axes. I have setup the interval on the bottom (time) axis to be .GetDateTimeStep(dtOneMinute) and the top axis to be 0.001. I am noticing an issue as the data set gets larger (20 minutes or more). The data does not seem to correlate.

Is there a way to link the axes together so that if I zoom in on a point, I can see the actual time, distance, altitude and speed for a particular point? Right now, if I zoom in, I can correlate the two axis individually, but not all four together.

Here is an image of my graph:

Image

To sum up...I have two series. The first series has the left axis as altitude with the bottom as time (talValue with a dtOneMinute increment). The second series has the right axis as speed and the top axis as distance (talvalue with a 0.001 increment)

How can I match these axes up?

One thing I noticed is that there is a vertical line for the bottom axis ticks, and a dotted line for the top axis ticks. I'm wondering if this might be part of the problem.

One final note. I am going through my data twice...once for each series (which I can't get around doing due to design constraints), but the data is the same.

Thanks...

Brigg Thorp

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Nov 09, 2004 9:07 am

Hi Brigg,
To sum up...I have two series. The first series has the left axis as altitude with the bottom as time (talValue with a dtOneMinute increment). The second series has the right axis as speed and the top axis as distance (talvalue with a 0.001 increment)

How can I match these axes up?

One thing I noticed is that there is a vertical line for the bottom axis ticks, and a dotted line for the top axis ticks. I'm wondering if this might be part of the problem.

One final note. I am going through my data twice...once for each series (which I can't get around doing due to design constraints), but the data is the same.
I guess the only thing you need to match up are the axis labels; the IAxis.GridPen issue can be easily resolved independently to this.

To match up the axis labels you will need to set the IAxis.Increment property of the top and bottom (and left and right, if necessary) axes to a common denominator. The value of dtOneMinute, for example is:

1 (day) / 24 (hours) / 60 (minutes) = 1 / 1440 = 0.00069444

setting the top axis increment to this value will make the axis labels match up.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply