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 1810 - Legend text ignores NewLine, cannot 'wrap' text.
Summary: Legend text ignores NewLine, cannot 'wrap' text.
Status: CONFIRMED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Legend (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-03 06:10 EST by christopher ireland
Modified: 2017-03-03 11:07 EST (History)
1 user (show)

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


Attachments
screenshot (10.78 KB, image/png)
2017-03-03 06:10 EST, christopher ireland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christopher ireland 2017-03-03 06:10:06 EST
Created attachment 731 [details]
screenshot

Code to reproduce:

procedure TForm1.InitChart;
var series: TLineSeries;
    s1: String;
begin
   Chart.View3D:=false;
   series:=TLineSeries(Chart.AddSeries(TLineSeries));

   s1:='One part of the label which is relatively long' + NewLine + 'the other part of the label which is also relatively long';

   series.Add(3, s1);
   series.Add(4, s1);

   Chart.Axes.Bottom.LabelsAngle:=90;
end;

see attached screenshot.
Comment 1 yeray alonso 2017-03-03 11:07:45 EST
Added a "Multi Line" checkbox in the Legend_Tester example at the Features Demo to test this.

- In GDI it seems to never do any MultiLine; we recommend moving to GDIPlus since we don't have plans to continue improving GDI.

- In GDIPlus, having multiple series with multiline text in their titles, all teh text is drawn in a single line and a blank space is drawn at the position of the sLineBreak.

- In GDIPlus, having a single series, and disabling CheckBoxes for he legend, the texts are drawn in multiple lines but the items height isn't correctly calculated.