My Labels OverLap

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Posts: 137
Joined: Mon Sep 22, 2008 12:00 am

My Labels OverLap

Post by Dave » Mon Dec 02, 2013 10:15 pm

Hi there

I am adding a line to a Chart. Usually this is straightforward however, in this case I need to have the line plotted with the highest X-value at the left most
position on the X-Axis and the lowest X-value at the furthest point on the X-axis. ie. I need to reverse the labels.

As far as Im aware the only way I can get the labels to display correctly is by adding my own labels? Or is there an easy way?

Im coding in C#.NET and Ive used the code below to add the labels. This works. However the problem is the labels overlap if I reduce the width of the window.
Is there a setting that I can set to stop the labels overlapping. Ive tried playing about with "Separation" ie.

theChart.Axes.Bottom.Labels.Separation = 30;

but had no success.

Im guessing there is an easy solution to this??


int count1 = theChart.Series[0].XValues.Count;

int z1 = 0;
while (z1 < count1)
string m = (count1 - z1).ToString();
theChart.Axes.Bottom.Labels.Items.Add(z1, m);

Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: My Labels OverLap

Post by Sandra » Tue Dec 03, 2013 9:57 am

Hello Dave,

I recommend you take a look in this thread, where is tried to give a solution of overlap labels,when you use custom labels. If you have any problems, please let me know.

I hope will helps.

Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
Image Image Image Image Image Image
Instructions - How to post in this forum

Posts: 137
Joined: Mon Sep 22, 2008 12:00 am

Re: My Labels OverLap

Post by Dave » Tue Dec 03, 2013 4:03 pm

Thanks Sandra. Actually Ive just noticed that in the TeeChart editor there is a checkbox which helps.

Click Chart tab, then the Axes tab then select "Bottom Axes", then the Scales tab and check/uncheck the "Inverted" check box. This reverses the chart and draws the correct labels in the Bottom axis.
So I'll see if this solves my problem and report back.

Post Reply