Page 1 of 1

My Labels OverLap

Posted: Mon Dec 02, 2013 10:15 pm
by 13050364
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;
theChart.Axes.Bottom.Labels.Items.Clear();

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

Re: My Labels OverLap

Posted: Tue Dec 03, 2013 9:57 am
by 10050769
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.

Thank,

Re: My Labels OverLap

Posted: Tue Dec 03, 2013 4:03 pm
by 13050364
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.