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 1684 - Consider axis labels multiline when calculating the height of the Chart Rect
Summary: Consider axis labels multiline when calculating the height of the Chart Rect
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Axis (show other bugs)
Version: 20.170306
Hardware: PC Windows
: --- enhancement
Target Milestone: v2017.20
Assignee: yeray alonso
URL: http://www.teechart.net/support/viewt...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-14 08:10 EST by yeray alonso
Modified: 2017-03-17 05:19 EDT (History)
0 users

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 2016-11-14 08:10:07 EST
If you are setting multi-line labels through AxisValuesFormat/DateTimeFormat, only one line is considered when calculating the chart height. So some of these lines can be drawn out of the chart rect. Ie:

uses Series;

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

  with Chart1.AddSeries(TFastLineSeries) as TFastLineSeries do
  begin
    //XValues.DateTime:=true;
    FillSampleValues;
  end;

  //Chart1.Axes.Bottom.DateTimeFormat:='dd/mm/yyyy' + sLineBreak + 'hh:mm' + sLineBreak + 'sss';
  Chart1.Axes.Bottom.AxisValuesFormat:='#,##0.###'+sLineBreak+'hello'+sLineBreak+'world';
end;