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

Summary: Legend text ignores NewLine, cannot 'wrap' text.
Product: VCL TeeChart Reporter: christopher ireland <chris>
Component: LegendAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: normal CC: yeray
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: screenshot

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.