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 1889

Summary: The axis title height isn't correctly considered when ResizeChart, multiple lines and ttfHtml format
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: AxisAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: enhancement CC: david, gromov.vsevolod
Priority: ---    
Version: 21.170329   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=3&t=16624
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2017-07-11 08:45:29 EDT
When you have ResizeChart set, the chart tries to calculate the title height to inflate the chart rect.
But when you have multiple lines with ttfHtml format (<br>) the title height isn't correctly calculated.

Here the code to reproduce the problem:

procedure TForm1.FormCreate(Sender: TObject);
begin
   Chart1.View3D := false;

   Chart1.AddSeries(TLineSeries).FillSampleValues;

   Chart1.BottomAxis.Title.Text := 'Line 1<BR>Line 2';
   Chart1.BottomAxis.Title.TextFormat := ttfHtml;
   Chart1.BottomAxis.Title.Transparent := false;
   Chart1.BottomAxis.ResizeChart := true;

   pTChartAxis := Chart1.CustomAxes.Add;
   pTChartAxis.Horizontal := true;
   pTChartAxis.Title.Text := 'Line 1<BR>Line 2';
   pTChartAxis.Title.TextFormat := ttfHtml;
   pTChartAxis.Title.Transparent := false;
   pTChartAxis.ResizeChart := true;

   with Chart1.AddSeries(TLineSeries) do
   begin
     FillSampleValues;
     CustomHorizAxis := pTChartAxis;
   end;
end;
Comment 1 sandra pazos 2018-03-01 10:49:58 EST
*** Bug 1584 has been marked as a duplicate of this bug. ***
Comment 2 david berneda 2023-03-17 12:16:23 EDT
Fixed. HTML format is now taken into account when calculating the size of the axis titles.