label style problem

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
WISEfn
Newbie
Newbie
Posts: 2
Joined: Fri May 27, 2005 4:00 am

label style problem

Post by WISEfn » Tue Feb 14, 2006 2:33 am

I wants applying the style in Label_font.

Steema.TeeChart.Chart ch1 = WebChart1.Chart;

ch1.Axes.Bottom.Labels.Angle = 60;
ch1.Axes.Bottom.Labels.Font.Size = 7;
ch1.Axes.Bottom.Labels.Font.Name = "Tahoma";
ch1.Axes.Bottom.Labels.Font.Color = Color.FromArgb(163, 133, 107);

The style is applied..
========================================

ch1.Axes.Bottom.Labels.Items.Clear();
for(int i = 0; i < 30 ; i++)
{
ch1.Axes.Bottom.Labels.Items.Add(i, DateTime.Now.Date.Day.Tostring());
}


But after like this sentence executing style is not applied..
There isn't a solution method?

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

Post by Narcís » Tue Feb 14, 2006 9:32 am

Hi yoonbo,

Yes, you need to do something like this:

Code: Select all

		private void Page_Load(object sender, System.EventArgs e)
		{
			Steema.TeeChart.Chart ch1 = WebChart1.Chart;

			ch1[0].FillSampleValues();

			ch1.Axes.Bottom.Labels.Angle = 60; 
			ch1.Axes.Bottom.Labels.Items.Clear(); 
			for(int i = 0; i < 30 ; i++) 
			{ 
				Steema.TeeChart.AxisLabelItem a = ch1.Axes.Bottom.Labels.Items.Add(i, DateTime.Now.Date.Day.ToString()); 
				a.Font.Size=7;
				a.Font.Name="Tahoma";
				a.Font.Color=Color.FromArgb(163, 133, 107);
			} 
		}
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