Page 1 of 1

label style problem

Posted: Tue Feb 14, 2006 2:33 am
by 8130006
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?

Posted: Tue Feb 14, 2006 9:32 am
by narcis
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);
			} 
		}