I happen to have a graph with labels on the bottom axis. The labels are long, so to see the text I've rotated them by 315 degrees...
In Win32 I was getting the following result, which was fine:
But the same graph under .NET does not work. The default behavior is broken and I cannot find any way to fix if (and no custom code, please! My users do not know how to write it!)
Labels on bottom axis
Re: Labels on bottom axis
Hi UserLS,
I've been able to reproduce it and I've added it to the wish list to be improved in future releases (TF02014529). In the meanwhile, you could use OnGetAxisLabels event to workaround this doing something similar to this:
I've been able to reproduce it and I've added it to the wish list to be improved in future releases (TF02014529). In the meanwhile, you could use OnGetAxisLabels event to workaround this doing something similar to this:
Code: Select all
void Bottom_GetAxisDrawLabel(object sender, Steema.TeeChart.GetAxisDrawLabelEventArgs e)
{
if (checkBox1.Checked)
{
if ((tChart1.Axes.Bottom.Labels.Angle > 90) & (tChart1.Axes.Bottom.Labels.Angle < 180))
{
e.Y = e.Y + 20;
}
else if ((tChart1.Axes.Bottom.Labels.Angle > 180) & (tChart1.Axes.Bottom.Labels.Angle < 270))
{
e.Y = e.Y + 20;
}
else if ((tChart1.Axes.Bottom.Labels.Angle > 270) & (tChart1.Axes.Bottom.Labels.Angle < 360))
{
e.Y = e.Y + 20;
e.X = e.X + 15;
}
}
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Labels on bottom axis
Besides the fact that this code looks very strange (why 20 pixels? why 15 pixels? Should it depend on the fonts?), I did add it and assigned event to the axis, but the event is fired only when graph is physically shown on your screen. Doing it in memory does not trigger the event even when calling the Draw() method. Also, if my bottom axis has a title and I am not showing anything below the graph (i.e. legend, footer, subfooter) than the suggested code makes my title disappear...
And this is just one of possibly several axes on the graph with different problems for each. Bottom line - can you guys fix your bugs, please?
And this is just one of possibly several axes on the graph with different problems for each. Bottom line - can you guys fix your bugs, please?
Re: Labels on bottom axis
Hi UserLS,
We have been investigating the issue and a fix for it is quite complicated as involves important code modifications. We will continue investigating it for future releases.
We have been investigating the issue and a fix for it is quite complicated as involves important code modifications. We will continue investigating it for future releases.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |