TLegend.Title problem solved in latest patch??
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
TLegend.Title problem solved in latest patch??
Hi,
I posted a question regarding that the legend.title overlaps the legend border( last year I think), is this fixed in the latest version? This is really important to me since this problem has and are still causing major problems in my application. Would be grateful if anyone can propose a workaround.
Best Regards,
Johan Ingemansson
I posted a question regarding that the legend.title overlaps the legend border( last year I think), is this fixed in the latest version? This is really important to me since this problem has and are still causing major problems in my application. Would be grateful if anyone can propose a workaround.
Best Regards,
Johan Ingemansson
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Johan,
This bug hasn't been fixed yet. I increased its priority. In the meantime, a workaround is using:
This bug hasn't been fixed yet. I increased its priority. In the meantime, a workaround is using:
Code: Select all
Chart1.Legend.ColumnWidthAuto:=false;
Chart1.Legend.ColumnWidths[0]:=70;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
Title in TChartLegend
Hi again,
sry, but setting the ColumnWidths[0]:=70, doesnt work, the only workaround I´ve managed is to set the ColumnWidths[0]:=LegendTitleSize(I calculate this myself), and if the title width is greater then the chartwidth, its width is set to the chartwidht(otherwise it wont be displayed) and title is "choped" to fit.
The problem with this workaround is that since columnwidths[0] is rather wide, I only get one series title per row, if I have for example 8 series in chart, then the legend will be big and since I have a constant chart height, the size for the graphical display is reduced significantly
Best Regards,
Johan Ingemansson
sry, but setting the ColumnWidths[0]:=70, doesnt work, the only workaround I´ve managed is to set the ColumnWidths[0]:=LegendTitleSize(I calculate this myself), and if the title width is greater then the chartwidth, its width is set to the chartwidht(otherwise it wont be displayed) and title is "choped" to fit.
The problem with this workaround is that since columnwidths[0] is rather wide, I only get one series title per row, if I have for example 8 series in chart, then the legend will be big and since I have a constant chart height, the size for the graphical display is reduced significantly
Best Regards,
Johan Ingemansson
Hi Johan,
it's working fine now, using the latest TeeChart Pro v7.06 available to download from the customers download page on our web site.
it's working fine now, using the latest TeeChart Pro v7.06 available to download from the customers download page on our web site.
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
TLegend.Title
Hi again,
You said that this bug was fixed in 7.06 but I have installed this patch and my conclusions is that TLegend.Title doesnt adjust for the TLegend.border, i.e if the title is wider then the border, it will overlap the border. If anyone have any solid workaround for this bug, I would be grateful.
Best Regards,
Johan Ingemansson
You said that this bug was fixed in 7.06 but I have installed this patch and my conclusions is that TLegend.Title doesnt adjust for the TLegend.border, i.e if the title is wider then the border, it will overlap the border. If anyone have any solid workaround for this bug, I would be grateful.
Best Regards,
Johan Ingemansson
Hi Johan,
how can you reproduce the problem ? Would you be so kink to post post the code you're using ?
how can you reproduce the problem ? Would you be so kink to post post the code you're using ?
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
Title in TChartLegend
Hi again,
This is the code I use for creating the legend:
with Legend do
begin
Alignment:=laBottom;
Font.Size:=10;
Font.Pitch:=fpFixed;
LegendStyle:=lsSeries;
Font.Name:='Arial';
ShadowColor:=clNone;
ShadowSize:=0;
Title.Text.Text:=ATextString(will max be 255 char long)
end;
[/img]
This is the code I use for creating the legend:
with Legend do
begin
Alignment:=laBottom;
Font.Size:=10;
Font.Pitch:=fpFixed;
LegendStyle:=lsSeries;
Font.Name:='Arial';
ShadowColor:=clNone;
ShadowSize:=0;
Title.Text.Text:=ATextString(will max be 255 char long)
end;
[/img]
Hi Johan,
yes, you're correct, I'm sorry, did not test it with the alignment. It's a bug which we'll try to fix asap, for the next maintenance release.
In meantime if the workaround you said does not help you so much, another option could be to hide the Frame of the Legend and draw it manually in the OnBeforeDrawChart event, using similar code to the following :
yes, you're correct, I'm sorry, did not test it with the alignment. It's a bug which we'll try to fix asap, for the next maintenance release.
In meantime if the workaround you said does not help you so much, another option could be to hide the Frame of the Legend and draw it manually in the OnBeforeDrawChart event, using similar code to the following :
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
with Chart1.Legend do
begin
Alignment:=laBottom;
Font.Size:=10;
Font.Pitch:=fpFixed;
LegendStyle:=lsSeries;
Font.Name:='Arial';
ShadowColor:=clNone;
ShadowSize:=0;
Frame.Visible := false;
title.Text.Text:='aaaaaa a a a aa a aaaa aa a a a aaaaaaaa aaaaaaaaaaaaa aaaaa a a a aaaaaaaaaa';
Chart1.Draw();
end;
end;
procedure TForm1.Chart1BeforeDrawChart(Sender: TObject);
var rl : trect;
begin
Chart1.Canvas.Pen.Color := clblue;
Chart1.Canvas.Brush.Style := bsSolid;
rl :=Chart1.Legend.RectLegend;
rl.Top := rl.Top -1;
rl.Right := rl.Right +75;
rl.left := rl.left -1;
Chart1.Canvas.Rectangle(rl);
end;
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
Next Release?
Hi again,
One quick question, what date is the next release scheduled for?
Best Regards,
Johan Ingemansson
One quick question, what date is the next release scheduled for?
Best Regards,
Johan Ingemansson
Hi Johan,
I cannot tell a fixed date, but I think the new v7.07 will be out on this month (Jan), which will include some fixes, and sure thing is that will include the fix for this problem as it has been fixed yet.
I cannot tell a fixed date, but I think the new v7.07 will be out on this month (Jan), which will include some fixes, and sure thing is that will include the fix for this problem as it has been fixed yet.
Pep Jorge
http://support.steema.com
http://support.steema.com
-
- Newbie
- Posts: 59
- Joined: Fri May 28, 2004 4:00 am
- Location: Sweden
When is patch 7.07 coming?
Hi again,
Just wondering, in previous post it was said that the next patch should be out in end of Jan, I still havent seen it. Has this patch been delayed, and when is it scheduled for?
Best Regards,
Johan Ingemansson
Just wondering, in previous post it was said that the next patch should be out in end of Jan, I still havent seen it. Has this patch been delayed, and when is it scheduled for?
Best Regards,
Johan Ingemansson
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Johan,
Yes, there is a TeeTree installing issue that needs to be fixed before and we are currently working on it. As soon as this is fixed the next maintenance release will be published.
Please be aware at those forums for further news.
Yes, there is a TeeTree installing issue that needs to be fixed before and we are currently working on it. As soon as this is fixed the next maintenance release will be published.
Please be aware at those forums for further news.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |