Hello,
what's the right way to set the length or height of an axis in pixels by code?
In my case I've the following situation:
The chart axis should appear in a fixed relation of length. For example when the bottom axis (X) has a length of 500px the left axis (Y) should have a ratio of 0.5 that is a length of 250px. When I change the chart width and the X-axis has now a length of 300px the Y-axis should be set to a length of 150px by code.
Thanks for your help.
Best regards
How to set length of axis in pixels?
-
- Newbie
- Posts: 9
- Joined: Fri Dec 03, 2004 5:00 am
- Location: Germany
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi UFriedrich,
You can do something like this:
Hope this helps!
You can do something like this:
Code: Select all
Chart1.Draw;
Chart1.Axes.Left.PositionUnits := muPixels;
Chart1.Axes.Left.StartPosition := 0;
Chart1.Axes.Left.EndPosition := Chart1.Axes.Bottom.IAxisSize * 0.5;
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 |