Hi,
We're using a TChart in our cataloguing programs to display statistics about a user's collection. We have a weird situation that the labels for the bottom axis in a bar chart are sometimes cut off. It's not exactly clear in which conditions this happens, but it looks like a bug in the component, since all we do is add the numbers and labels.
Here's a screen shot of what it looks like. The TChart component is aligned to client:
The labels on the bottom axis are in a 90 degree angle. The rest of the axis settings are pretty much default.
Is there a setting I'm missing? Or could this be a bug in the component. It's pretty hard to show you in a sample project. It may be related to how high the bars are and the string length of the labels.
Thanks,
Ronald
Collectorz.com
TChart axis labels cut off
Re: TChart axis labels cut off
Hi Ronald,
If you are using a custom horizontal axis you'll have to add some extra bottom margin manually. You could use the axis MaxLabelsWidth and use this value (with some extra pixels for the ticks length) as Bottom Margin:
If you are using a custom horizontal axis you'll have to add some extra bottom margin manually. You could use the axis MaxLabelsWidth and use this value (with some extra pixels for the ticks length) as Bottom Margin:
Code: Select all
Chart1.MarginUnits:=muPixels;
Chart1.MarginBottom:=Chart1.CustomAxes[0].MaxLabelsWidth + 10;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 2
- Joined: Thu Aug 04, 2011 12:00 am
Re: TChart axis labels cut off
Thanks Yeray! That worked like a charm.