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 101 - Legend text with CRLF overlaps other items.
Summary: Legend text with CRLF overlaps other items.
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Legend (show other bugs)
Version: 131016
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL: https://forums.embarcadero.com/thread...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-14 07:28 EST by narcís calvet
Modified: 2013-11-14 09:44 EST (History)
1 user (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 narcís calvet 2013-11-14 07:28:09 EST
In Delphi XE5 Upd1 TeeChart lite works different way as the previous versions (Pro version does the same). The CRLF were ignored in legend title. Now if the Series.LegendTitle property string has a CRLF the lines goes over other texts. See image: https://www.dropbox.com/sh/xy71xk3sby3zg6s/ozpZ9kbgGz

Code to reproduce:

uses VCLTee.Series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.AddSeries(TLineSeries.Create(Self)).FillSampleValues();
  Chart1.AddSeries(TLineSeries.Create(Self)).FillSampleValues();

  Chart1[0].LegendTitle := 'This is' + #10#13 + 'a test';

  //Workaround
  //Chart1.Legend.VertSpacing:=15;
end;
Comment 1 david berneda 2013-11-14 09:44:21 EST
Fixed.

The fix covers several cases of text found inside the series LegendTitle or Title properties, when they are used to display at chart legend:

#10#13
#13#10
#13
#10

in all cases, they are replaced with a single space character.

A future wish would be enabling the legend to support multiple-lines of text for a legend item.  

Somewhat difficult, as currently legend items are considered everywhere to have an equal, fixed height in pixels based on legend font size (plus legend symbol height and margins if visible).

If this is done, then #13#10 chars would not need to be removed.