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 - The axis title height isn't correctly considered when ResizeChart, multiple lines and ttfHtml format
Summary: The axis title height isn't correctly considered when ResizeChart, multiple l...
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Axis (show other bugs)
Version: 21.170329
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: http://www.teechart.net/support/viewt...
Keywords:
: 1584 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-11 08:45 EDT by yeray alonso
Modified: 2023-03-17 12:16 EDT (History)
2 users (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 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.