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 - Right axis title overlapping labels in pdf
Summary: Right axis title overlapping labels in pdf
Status: CONFIRMED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Export (show other bugs)
Version: 30.200525
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-22 09:05 EDT by yeray alonso
Modified: 2020-10-22 09:05 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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;