Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2204

Summary: Give access to the Series StartZ and EndZ properties
Product: ActiveX TeeChart Reporter: yeray alonso <yeray>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: enhancement CC: pep
Priority: ---    
Version: TeeChart Pro Activex Control 2018.0.2.9 Release   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2019-05-23 07:32:18 EDT
In VCL you can set StartZ and EndZ properties.
These properties are set at the beginning of the drawing routine, but they make effect if you set them at the OnBeforeDrawAxes event.

This would allow to use the Shape series manually setting its Z position.
It would be easier if we had a 3D Shape series as requested in the following ticket, which also includes a Delphi example using the StartZ and EndZ at OnBeforeDrawAxes event as a workaround:
http://bugs.teechart.net/show_bug.cgi?id=2203
Comment 1 pep jorge 2020-04-06 12:45:18 EDT
StartZ,MiddleZ, and EndZ properties added for v2020. 
Now you're able to do :

Private Sub Form_Load()
Dim i As Integer

  TChart1.Aspect.Chart3DPercent = 70
  TChart1.Aspect.Zoom = 70
  TChart1.Aspect.Orthogonal = False

  TChart1.Axis.Depth.Visible = True
  TChart1.Axis.Depth.Labels.Style = talValue
  TChart1.Axis.Depth.SetMinMax 0, 5
  TChart1.Axis.Left.SetMinMax 0, 5
  TChart1.Axis.Bottom.SetMinMax 0, 5
  TChart1.Axis.Depth.Increment = 1
  TChart1.Axis.Left.Increment = 1
  TChart1.Axis.Bottom.Increment = 1

  TChart1.Environment.InternalRepaint

  For i = 0 To 5
    TChart1.AddSeries scShape
    With TChart1.Series(i).asShape
        .X0 = i
        .X1 = i + 1
        .Y0 = i
        .Y1 = i + 1
        .Style = chasCube
    End With
  Next i
End Sub


Private Sub TChart1_OnBeforeDrawAxes()
Dim i As Integer
  For i = 0 To TChart1.SeriesCount - 1
    With TChart1.Series(i)
         If TChart1.Series(0).YMandatory Then
            .StartZ = TChart1.Axis.Depth.CalcYPosValue(i)
            .EndZ = TChart1.Axis.Depth.CalcYPosValue(i + 1)
            .Depth = TChart1.Axis.Depth.CalcYPosValue(1) - TChart1.Axis.Depth.CalcYPosValue(0)
        End If
    End With
    Next i
End Sub