Draw Legend
Draw Legend
Hi,
After I downloaded update from October 5 for version 2010 I found a bug: the legend drawn after chart drawn event (see below) not fully covers old one. Old legend's first item above newly drawn legend items (I think that all other covered).
procedure TfrmMain.chartAfterDraw(Sender: TObject);
begin
(Sender As TChart).Legend.DrawLegend;
end;
After I downloaded update from October 5 for version 2010 I found a bug: the legend drawn after chart drawn event (see below) not fully covers old one. Old legend's first item above newly drawn legend items (I think that all other covered).
procedure TfrmMain.chartAfterDraw(Sender: TObject);
begin
(Sender As TChart).Legend.DrawLegend;
end;
Re: Draw Legend
Hi fredff13,
I'm not sure to understand what are you exactly trying to do, and neither what is the exact difference in behaviour between versions you see.
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
I'm not sure to understand what are you exactly trying to do, and neither what is the exact difference in behaviour between versions you see.
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Draw Legend
Hi, I set Legend.Visible to False to avoid drawing at position which not matching run-time one. It's still a bug as it has not been observed in previous version (legend was drawing on top of each other, so fully covered "visible" legend). See attached screen shots.
Thanks, Fred
Thanks, Fred
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Draw Legend
Hi fredff13,
As Yeray already asked, it would be very helpful for us to be able to provide an accurate answer if you could provide a simple example project we can run "as-is" to reproduce the problem here.
Thanks in advance.
As Yeray already asked, it would be very helpful for us to be able to provide an accurate answer if you could provide a simple example project we can run "as-is" to reproduce the problem here.
Thanks in advance.
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 |
Re: Draw Legend
I have attached simple project as you requested
- Attachments
-
- DrawLegend.zip
- Issue with drawing legend after chart was drawn (overlapping)
- (9.86 KiB) Downloaded 430 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Draw Legend
Hi fredff13,
In which TeeChart version do you think this worked fine? Also, what are you trying to achieve with this? We may be able to provide an alternative solution.
Thanks in advance.
In which TeeChart version do you think this worked fine? Also, what are you trying to achieve with this? We may be able to provide an alternative solution.
Thanks in advance.
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 |
Re: Draw Legend
Hello, I just pointed to that version before the latest update has not such effect. Legend design-time position was the same as was drawn by DrawLegend function.
Thanks, Fred
Thanks, Fred
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Draw Legend
Hi Fred,
Thanks for the information. I found that v2010.00.00407 worked as you expected while this behaviour changed in v2010.01.11004. I have added the issue to the defect list (TV52015261) to be investigated.
Thanks for the information. I found that v2010.00.00407 worked as you expected while this behaviour changed in v2010.01.11004. I have added the issue to the defect list (TV52015261) to be investigated.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Draw Legend
Hi Fred,
I just wanted to inform you that I have fixed this bug for the next TeeChart 2010 VCL maintenance release. If you are a source code customer you can implement the fix at your end doing a little change at Chart.pas. At TCustomChartLegend.DrawLegend method add tmpRect variable of TRect type and change this code:
for this:
I just wanted to inform you that I have fixed this bug for the next TeeChart 2010 VCL maintenance release. If you are a source code customer you can implement the fix at your end doing a little change at Chart.pas. At TCustomChartLegend.DrawLegend method add tmpRect variable of TRect type and change this code:
Code: Select all
with tmpChart.ChartRect do
ShapeBounds.Top:=Top+tmp+Round(1.0*FTopLeftPos*(Bottom-Top-tmp)*0.01);
Code: Select all
if {$IFNDEF CLR}TCustomChartAccess{$ENDIF}(ParentChart).CustomChartRect then
tmpRect:=tmpChart.ChartRect
else
tmpRect:=tmpChart.ChartBounds;
with tmpRect do
ShapeBounds.Top:=Top+tmp+Round(1.0*FTopLeftPos*(Bottom-Top-tmp)*0.01);
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 |