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
dynamically setting X and Z axis lengths on surface plots
Hi Mark,
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 ) :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.
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.
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.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.
Pep Jorge
http://support.steema.com
http://support.steema.com
Any resolution?
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.
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.
OK...I answered myself :o)
You can adjust the left axis start and end positions to do 'z-axis' scaling!