Dear,
If we have long text labels on the X Axis, the first label gets cropped when we rotate them. see screenshot attached.
What can I do to make sure that the label does not get chopped off.
thanks,
Marijke Van Bergen
OM Partners.
Labels on the X Axis are cropped
Labels on the X Axis are cropped
- Attachments
-
- Capture.PNG (56.84 KiB) Viewed 6972 times
Re: Labels on the X Axis are cropped
Hello Marijke Van Bergen,
I recommend try to increase the space of MarginLeft adjusting it to your convenience. For example, you can do something as next:
I hope will helps.
Thanks,
I recommend try to increase the space of MarginLeft adjusting it to your convenience. For example, you can do something as next:
Code: Select all
tChart1.Panel.MarginLeft = 10;
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: Labels on the X Axis are cropped
The problem with this solution is that our data on the chart (including the labels) in very dynamic. We never know the length of the labels, so setting a hard coded margin is not the best solution. We are looking for a solution that takes into account the length of the labels.
Kind regards,
Marijke
Kind regards,
Marijke
Re: Labels on the X Axis are cropped
Hello OMP,
You can use MaxLabelsWidth to calculate the width of your labels:
My recommendation is you use a similar code as previous to fix your problem.
I hope will helps.
Thanks,
You can use MaxLabelsWidth to calculate the width of your labels:
Code: Select all
private void CalcMargins()
{
tChart1.Draw();
tChart1.Panel.MarginUnits = Steema.TeeChart.PanelMarginUnits.Pixels;
tChart1.Panel.MarginLeft = tChart1.Panel.MarginLeft+tChart1.Axes.Bottom.MaxLabelsWidth();
}
I hope will helps.
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 |