Botton Axix label display

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
gs
Newbie
Newbie
Posts: 84
Joined: Mon Mar 20, 2006 12:00 am
Location: US

Botton Axix label display

Post by gs » Thu Nov 06, 2008 9:55 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 06, 2008 10:19 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gs
Newbie
Newbie
Posts: 84
Joined: Mon Mar 20, 2006 12:00 am
Location: US

Post by gs » Thu Nov 06, 2008 10:49 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 06, 2008 11:44 am

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]);
			}
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gs
Newbie
Newbie
Posts: 84
Joined: Mon Mar 20, 2006 12:00 am
Location: US

Post by gs » Mon Nov 10, 2008 7:03 am

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Nov 10, 2008 9:47 am

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:

Code: Select all

			tChart1.Panel.MarginBottom = 0;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

gs
Newbie
Newbie
Posts: 84
Joined: Mon Mar 20, 2006 12:00 am
Location: US

Post by gs » Mon Nov 10, 2008 1:40 pm

Its not working. Could you please tell me the alternative way. Its urgent, I have got a demo today

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Nov 10, 2008 2:33 pm

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?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply