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 2380

Summary: Right axis title overlapping labels in pdf
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ExportAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: enhancement CC: yeray
Priority: ---    
Version: 30.200525   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2020-10-22 09:05:26 EDT
Test project here:

procedure TForm1.AxisTitleExport;
const fileName='test';
begin
  with Chart1.AddSeries(TLineSeries) do
  begin
    FillSampleValues;
    VertAxis:=aBothVertAxis;
  end;

  Chart1.Axes.Left.Title.Text:='Left axis title';
  Chart1.Axes.Right.Title.Text:='Right axis title';
  Chart1.Title.Text.Text:=TeeMsg_Version;

  TeeSaveToPDFFile(Chart1, fileName+'.pdf');
  TeeGoToURL(Handle,fileName+'.pdf');
end;

This was broken with the fix for #1521: http://bugs.teechart.net/show_bug.cgi?id=1521
Adding the OnAfterDraw event below you can see how RotateLabel worked better before that fix.

procedure TForm1.ChartAfterDraw(Sender: TObject);
var xpos: Integer;
begin
  with Chart1.Canvas do
  begin
    xpos:=0;
    repeat
      Line(xpos, 0, xpos, Chart1.Height);
      RotateLabel(xpos,Chart1.Height div 2, 'Hello ' + IntToStr(xpos), 90);
      RotateLabel(xpos,Chart1.Height div 2, 'Hello ' + IntToStr(xpos), -90);
      Inc(xpos, 100);
    until (xpos>=Chart1.Width);
  end;
end;