TAChart: Display legend symbols even if the text is empty

git-svn-id: trunk@37525 -
This commit is contained in:
ask 2012-06-05 07:56:10 +00:00
parent a3db9f6244
commit 8d53e7ceb4

View File

@ -556,7 +556,10 @@ begin
Result := Point(0, 0);
for li in AItems do begin
li.UpdateFont(ADrawer, prevFont);
p := ADrawer.TextExtent(li.Text);
if li.Text = '' then
p := Point(0, ADrawer.TextExtent('I').Y)
else
p := ADrawer.TextExtent(li.Text);
if li.HasSymbol then
p.X += SYMBOL_TEXT_SPACING + SymbolWidth;
Result := MaxPoint(p, Result);