As I'm showing the legend of my chart only on demand (click) i would like to have it drawn on top of the grid and all series (lower image) but it seems always to be shown below (lower image).
Is there a way to accomplish this?
TIA
Legend on top of chart?
Re: Legend on top of chart?
Hello TIA,
I couldn't reproduce your problem using last version 2010. Can you please, send us a simple project we can run as-is here? So we try to find a solution for your problem. Moreover you can tell us which version of TeeChartVCL you are using now?
Thanks,
I couldn't reproduce your problem using last version 2010. Can you please, send us a simple project we can run as-is here? So we try to find a solution for your problem. Moreover you can tell us which version of TeeChartVCL you are using now?
Thanks,
Best Regards,
Sandra Pazos / 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: Legend on top of chart?
I've attached a simple form (no code). When I open the form the legend is drawn behind everything (actually showing the back wall completly hides the legend). This is the form, where yesterdays screenshot origins from.
I've had that with the older version of tchart as well as with the current (2010.02.20202).
TIA (which means Thanks In Advance )
I've had that with the older version of tchart as well as with the current (2010.02.20202).
TIA (which means Thanks In Advance )
- Attachments
-
- demo.7z
- (2.66 KiB) Downloaded 465 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Legend on top of chart?
Hi Whookie,
Ok, I had to look at the form in text mode then
The problem was ResizeChart property set to false. To achieve what you request you should set legend to a custom position as in the code snippet below.
Ok, I had to look at the form in text mode then
The problem was ResizeChart property set to false. To achieve what you request you should set legend to a custom position as in the code snippet below.
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart.Legend.ResizeChart:=True;
Chart.Legend.CustomPosition:=True;
Chart.Draw;
end;
procedure TForm1.ChartAfterDraw(Sender: TObject);
begin
Chart.Legend.Left:=Chart.ChartRect.Right - Chart.Legend.Width - 10;
Chart.Legend.Top:=10;
end;
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 |