Page 1 of 1
X axis Text labels
Posted: Thu Sep 09, 2010 5:06 pm
by 13047073
I'm having difficulty adding text labels to my bar chart. I have a set of 7 set values I would like to put on the x axis but am unable to do so.
Any help would be much appreciated.
I'm using c# and vs 2005.
Thanks!
Nick
Re: X axis Text labels
Posted: Fri Sep 10, 2010 3:29 pm
by yeray
Hi Nick,
You could use the override of the Add method that accepts labels. For example:
Code: Select all
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
Random r = new Random();
for (int i = 0; i < 5; i++)
{
bar1.Add(r.Next(), "bar nÂș" + i.ToString());
}
Re: X axis Text labels
Posted: Fri Sep 10, 2010 7:50 pm
by 13047073
Thanks a lot!
Worked like a charm.
Regards,
Nick