X axis Text labels

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Nick
Newbie
Newbie
Posts: 7
Joined: Fri Oct 19, 2007 12:00 am

X axis Text labels

Post by Nick » Thu Sep 09, 2010 5:06 pm

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

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: X axis Text labels

Post by Yeray » Fri Sep 10, 2010 3:29 pm

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());
            }
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Nick
Newbie
Newbie
Posts: 7
Joined: Fri Oct 19, 2007 12:00 am

Re: X axis Text labels

Post by Nick » Fri Sep 10, 2010 7:50 pm

Thanks a lot!

Worked like a charm.

Regards,

Nick

Post Reply