Page 1 of 1
Botton Axix label display
Posted: Thu Nov 06, 2008 9:55 am
by 9640703
WebChart1.Chart.Axes.Bottom.Labels.Angle = 45; only maximum 7 labels display but if I put WebChart1.Chart.Axes.Bottom.Labels.Angle = 90; it displays all (more than 20also)
what should be done to display all using WebChart1.Chart.Axes.Bottom.Labels.Angle = 45; and also when I define this property graph size reduces to half.
Posted: Thu Nov 06, 2008 10:19 am
by narcis
Hi gs,
TeeChart tries to plot as many labels as possible in the axes according to their Increment property and not allowing labels to overlap. I recommend you to read
this thread. Please notice this is quite a long thread (has several pages) and what you are looking for may not appear in the first posts. However, several possibilities were discussed there.
Posted: Thu Nov 06, 2008 10:49 am
by 9640703
You did not answer my question. Here is the example grapg even though it has space it not printing labels.
I am uploading grpph for you to see.
Posted: Thu Nov 06, 2008 11:44 am
by narcis
Hi gs,
Yes, this needs to be enhanced. I've added this issue (TF02013544) to the wish-list to be enhanced for next releases. The only workaround I can think of for now is using custom labels, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.Marks.Visible = false;
Random y = new Random();
for (int i = 0; i < 50; i++)
{
bar1.Add(y.Next(), "bar number " + (i + 1).ToString());
}
tChart1.Axes.Bottom.Labels.Angle = 45;
tChart1.Axes.Bottom.Labels.Items.Clear();
for (int j = 0; j < bar1.Count; j=j+2)
{
tChart1.Axes.Bottom.Labels.Items.Add(bar1.XValues[j], bar1.Labels[j]);
}
}
Posted: Mon Nov 10, 2008 7:03 am
by 9640703
Thanks. It worked out but one more problem now the height of the graph reduces to half of the size even though there is space left.
Posted: Mon Nov 10, 2008 9:47 am
by narcis
Hi gs,
Yes, this is also at the wish-list to be enhanced. In the meantime you can try setting panel's bottom margin like this:
Posted: Mon Nov 10, 2008 1:40 pm
by 9640703
Its not working. Could you please tell me the alternative way. Its urgent, I have got a demo today
Posted: Mon Nov 10, 2008 2:33 pm
by narcis
Hi gs,
This works fine for me here using latest TeeChart for .NET v3 release available at the client area, which is build 3.5.3225.32183/4/5 from 3rd November 2008. Is this the version you are using?