Custom Axes' Labels Overlap

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
OilMan
Newbie
Newbie
Posts: 7
Joined: Wed Dec 27, 2000 5:00 am
Location: Calgary, Canada
Contact:

Custom Axes' Labels Overlap

Post by OilMan » Tue Oct 05, 2004 4:45 pm

Hello,

I have two custom left axes on my chart. I only want one vertical axis line shown, so the position of both axes is the same. However, this causes my labels to overlap and only show the labels for one axis. Is there a way to move the labels of the second axis without moving the axis itself?


Cheers,

GC

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Oct 06, 2004 2:21 pm

Hi,

one trick could to change the LabelText for one of the axes so they appear wish spaces on the right side :

Code: Select all

private void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if ((Steema.TeeChart.Axis)sender==tChart1.Axes.Left)
e.LabelText = e.LabelText + "      .";
}

OilMan
Newbie
Newbie
Posts: 7
Joined: Wed Dec 27, 2000 5:00 am
Location: Calgary, Canada
Contact:

Post by OilMan » Wed Oct 06, 2004 3:07 pm

Hi Josep,

Thanks for the code. That offsets the labels horizontally. Is there any way to offset the labels vertically up or down the custom axis?

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Oct 07, 2004 8:44 am

Hi,

in that case, I think the best way around this could be to add custom labels for the Axes, in this manner you can specify where do ou want to appear a Axis Label (in which YValue). You can see one example of this in the Demo features project under : All Features -> Welcome ! -> Axes -> Labels -> Custom Labels.

OilMan
Newbie
Newbie
Posts: 7
Joined: Wed Dec 27, 2000 5:00 am
Location: Calgary, Canada
Contact:

Post by OilMan » Thu Oct 07, 2004 3:51 pm

Thanks Josep!

That's exactly what I needed.

Regards,


GC

Post Reply