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 785

Summary: Automatic axis labels and title re-positioning considering chart rotation
Product: VCL TeeChart Reporter: narcís calvet <narcis>
Component: AxisAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: enhancement    
Priority: Normal    
Version: 140512   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: Chart image of overlapping labels and title.

Description narcís calvet 2014-05-30 05:49:36 EDT
Created attachment 212 [details]
Chart image of overlapping labels and title.

It would be very interesting that axis labels and titles could automatically re-position themselves to not overlap chart walls, axis and series depending on the chart rotation. The problem can be easily reproduce with the code snippet below and observed with the attached image.

uses TeeSurfa, TeeTools;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.AddSeries(TTowerSeries.Create(Self)).FillSampleValues();
  Chart1.Aspect.Orthogonal:=False;
  Chart1.Aspect.Zoom:=80;
  Chart1.Chart3DPercent:=70;
  Chart1.DepthAxis.Visible:=True;
  Chart1.Axes.Bottom.Title.Text:='Bottom axis title';
  Chart1.Axes.Bottom.Title.Font.Color:=clRed;
  Chart1.Axes.Bottom.Title.Font.Size:=20;

  Chart1.Tools.Add(TRotateTool.Create(Self));
end;

procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
  Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
  if Sender <> Chart1.Axes.Left then
    LabelText:='long label text';
end;