Hello,
we have to position a SubChart outside the Chart Axis, e.g. under the Chart.Legend. Because the SubChart should not hide any info of the Main chart, but if we try this to position the SubChart under the Legend there are many problems :
procedure TGraphForm.ChartIntResize(Sender: TObject);
begin
ChartTool3.Charts[0].Chart.Left := ChartInt.Legend.Left -50 ;
ChartTool3.Charts[0].Chart.Top := ChartInt.Height - ChartTool3.Charts[0].Chart.Height -50 ;
end;
This code does not function well, because there is now way to deal with Form maximize and if only the Chart is resizing the SubChart is only following very slow the Main Chart Position.
Can you help us?
Your sincerely
Willi Ebert
Position of a SubChart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Position of a SubChart
Hi Willi,
Could you please attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
Could you please attach 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 |
-
- Newbie
- Posts: 26
- Joined: Wed Aug 25, 2010 12:00 am
Re: Position of a SubChart
Hello Narcís,
here is a test project. The SubChart stays not under the legend like it is defined in the Chart1Resize procedure.
Your sincerely
Willi
here is a test project. The SubChart stays not under the legend like it is defined in the Chart1Resize procedure.
Your sincerely
Willi
- Attachments
-
- SubChart.zip
- (12.33 KiB) Downloaded 426 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Position of a SubChart
Hi Willi,
Implementing OnResize as shown below works fine for me here. Chart needs to be drawn so that legend properties have correct values.
Implementing OnResize as shown below works fine for me here. Chart needs to be drawn so that legend properties have correct values.
Code: Select all
procedure TForm2.Chart1Resize(Sender: TObject);
begin
Chart1.Draw;
ChartTool1.Charts[0].Chart.Left := Chart1.Legend.Left -50 ;
ChartTool1.Charts[0].Chart.Top := Chart1.Legend.ShapeBounds.Bottom;
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 |
-
- Newbie
- Posts: 26
- Joined: Wed Aug 25, 2010 12:00 am
Re: Position of a SubChart
Hello Narcís,
thank you very much for your help. Chart1.Draw was the key.
Your sincerely
Willi Ebert
thank you very much for your help. Chart1.Draw was the key.
Your sincerely
Willi Ebert