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 2203

Summary: Include a 3D Shape series
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: enhancement CC: c0u1r
Priority: ---    
Version: 26.181203   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2019-05-23 07:24:30 EDT
The regular Shape series (TChartShape) include a Cube Style. However, you can't set its Z start and end positions.

You can do it manually setting the Series StartZ, EndZ and Depth properties at OnBeforeDrawAxes as in the example below, but it would be easier if we had a Shape series with Z0 and Z1 properties.

uses TeeShape;

procedure TForm1.Chart1BeforeDrawAxes(Sender: TObject);
var i: Integer;
begin
  for i:=0 to Chart1.SeriesCount-1 do
    with Chart1[i] do
    begin
      StartZ:=Chart1.Axes.Depth.CalcPosValue(i);
      EndZ:=Chart1.Axes.Depth.CalcPosValue(i+1);
      Depth:=Chart1.Axes.Depth.CalcPosValue(1)-Chart1.Axes.Depth.CalcPosValue(0);
    end;
end;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.Chart3DPercent:=70;
  Chart1.Aspect.Zoom:=70;
  Chart1.Aspect.Orthogonal:=False;

  Chart1.DepthAxis.Visible:=True;
  Chart1.DepthAxis.LabelStyle:=talValue;
  Chart1.DepthAxis.SetMinMax(0,5);
  Chart1.Axes.Left.SetMinMax(0,5);
  Chart1.Axes.Bottom.SetMinMax(0,5);
  Chart1.DepthAxis.Increment:=1;
  Chart1.Axes.Left.Increment:=1;
  Chart1.Axes.Bottom.Increment:=1;

  Chart1.Draw;

  for i:=0 to 5 do
  with TChartShape(Chart1.AddSeries(TChartShape)) do
  begin
    X0:=i;
    X1:=i+1;
    Y0:=i;
    Y1:=i+1;
    Style:=chasCube;
  end;
end;
Comment 1 Robert Junior 2024-05-20 10:55:09 EDT
The regular Shape series (TChartShape) include a Cube Style. However, you can't set its Z start and end positions.

You can do it manually setting the Series StartZ, EndZ and Depth properties at OnBeforeDrawAxes as in the example below, but it would be easier if we had a Shape series with Z0 and Z1 properties.

uses TeeShape;

procedure TForm1.Chart1BeforeDrawAxes(Sender: TObject);
var i: Integer;
begin
  for i:=0 to Chart1.SeriesCount-1 do
    with Chart1[i] do
    begin
      StartZ:=Chart1.Axes.Depth.CalcPosValue(i);
      EndZ:=Chart1.Axes.Depth.CalcPosValue(i+1);
      Depth:=Chart1.Axes.Depth.CalcPosValue(1)-Chart1.Axes.Depth.CalcPosValue(0);
    end;
end;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.Chart3DPercent:=70;
  Chart1.Aspect.Zoom:=70;
  Chart1.Aspect.Orthogonal:=False;

  Chart1.DepthAxis.Visible:=True;
  Chart1.DepthAxis.LabelStyle:=talValue;
  Chart1.DepthAxis.SetMinMax(0,5);
  Chart1.Axes.Left.SetMinMax(0,5);
  Chart1.Axes.Bottom.SetMinMax(0,5);
  Chart1.DepthAxis.Increment:=1;
  Chart1.Axes.Left.Increment:=1;
  Chart1.Axes.Bottom.Increment:=1;

  Chart1.Draw;

  for i:=0 to 5 do
  with TChartShape(Chart1.AddSeries(TChartShape)) do
  begin
    X0:=i;
    X1:=i+1;
    Y0:=i;
    Y1:=i+1;
    Style:=chasCube;
  end;
end;

Patched on: https://emp3juice.blog/
https://y2mate.diy/
https://tubidy.diy/