dynamically setting X and Z axis lengths on surface plots

TeeChart for ActiveX, COM and ASP
Post Reply
Mark#1
Newbie
Newbie
Posts: 10
Joined: Mon Aug 30, 2004 4:00 am

dynamically setting X and Z axis lengths on surface plots

Post by Mark#1 » Tue Aug 31, 2004 4:03 pm

I'm using TeeChart 7 AX to generate surface plots based on user provided data. X coordinates (bottom axis) coorespond to geographical coordinates (East/West), Z coordinates (depth axis) coorespond to North/South geographical coordinates, and Y axes coorespond to surface plot heights.

Ideally, I would like to be able to scale the X and Z axes to reflect their relative sizes based on the user-provided data. I have been exploring the .Depth, .Chart3dPercent, .TimesZOrder, and .SetIsometric attributes of TeeChart, but I do not really have a feel for how these things really relate to actual surface plot attributes.

Can anyone help?

For what it's worth, the help file mentions with respect to the the .Chart3dPercent property that "The Chart3DPercent property indicates the size ratio between Chart dimensions and Chart depth", but makes no mention of the specific relationships involved or what actual chart dimension is involved in the ratio.

Likewise, with respect to the .TimesZOrder property, the help file says "The TimesZOrder property defines how big the Z axis (the depth axis) will be respect to a Surface or Contour's width and height. By default, the Surface depth will be 3 times the LineSeries depth." But again, I fail to understand the specific relationships involved that might allow me to scale my plots the way I need to.

Thanks in advance for any help anyone can provide,

-Mark

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Sep 06, 2004 8:11 am

Hi Mark,
Ideally, I would like to be able to scale the X and Z axes to reflect their relative sizes based on the user-provided data. I have been exploring the .Depth, .Chart3dPercent, .TimesZOrder, and .SetIsometric attributes of TeeChart, but I do not really have a feel for how these things really relate to actual surface plot attributes.
The SetIsometric method only works for X and Y axis. But you should be able to accomplish this using the Chart3DPercent (as I think you sent me the following method you was using ) :
Given these variables derived from user's data, I wrote the following code:

If YRange# >= XRange# Then
TChart1.Aspect.Chart3DPercent = Int((XRange# / YRange#) * 100)
else
TChart1.Aspect.Chart3DPercent = Int((YRange# / XRange#) * 100)
endif

So if my Yrange# is >= the XRange, I plot my North/South data on TeeChart's X axis and East/West data on TeeChart's Z axis. The chart3dpercent value becomes proportional to the XRange# and YRange# values. In contrast, if YRange#<XRange#, I plot my North/South data on Teechart's Z axis and East/West data on teechart's X axis.
For what it's worth, the help file mentions with respect to the the .Chart3dPercent property that "The Chart3DPercent property indicates the size ratio between Chart dimensions and Chart depth", but makes no mention of the specific relationships involved or what actual chart dimension is involved in the ratio.
Chart3DPercent isn't designed to provide this kind of precision. Sizing may also be affected by Legend text and location as TeeChart best-fits contents. Whilst adjustment of the different parameters may give a close approximation, for precise mapping co-ordinates with true map-like scaled-grid on a 3D surface a specialised mapping tool may be better suited than TeeChart.

LAL
Newbie
Newbie
Posts: 40
Joined: Fri Jun 20, 2008 12:00 am

Any resolution?

Post by LAL » Thu Jul 03, 2008 3:11 am

Hi Mark,

I know I'm resurrecting an old issue, but did you get anywhere with this? I facing similar issues, and not being able to set axis scaling factors relative to one another is a real pain...

I'm only after approximately scaled x, y coords so I think I can use .Chart3DPercent and .TimesZOrder along the lines of:

If YRange# >= XRange# Then
TChart1.Aspect.Chart3DPercent = Int((XRange# / YRange#) * 100)
else
TChart1.Series.TimesZOrder = Int((YRange# / XRange#) * 3)
endif

That just leaves the Z coord (height). I was directed to this:

http://www.teechart.net/support/viewtopic.php?t=7885

which will probably be OK. Except that it adjusts the axes by adding offsets, which has the effect of 'shrinking' your data set.

LAL
Newbie
Newbie
Posts: 40
Joined: Fri Jun 20, 2008 12:00 am

OK...I answered myself :o)

Post by LAL » Thu Jul 03, 2008 4:01 am

You can adjust the left axis start and end positions to do 'z-axis' scaling!

Post Reply