Format Date Display

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Joy
Newbie
Newbie
Posts: 8
Joined: Fri Dec 23, 2005 12:00 am

Format Date Display

Post by Joy » Sun Nov 16, 2008 10:24 pm

Hi,

I've been trying unsuccessfully to figure out a way to format the dates displayed on the bottom axis of our line plot. I would like to be able to just display the years and only the years I would like to display. Is that possible and if so, how would I do it?

Thank you!

Joy

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 17, 2008 9:53 am

Hi Joy,

First of all you may need to set your series XValues to be DateTime:

Code: Select all

			points1.XValues.DateTime = true;
Then you will also have to set labels format:

Code: Select all

			tChart1.Axes.Bottom.Labels.DateTimeFormat = "yyyy";
For more information please read Tutorial 4. Tutorials are available at TeeChart's program group.

Hope this helps!
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

Joy
Newbie
Newbie
Posts: 8
Joined: Fri Dec 23, 2005 12:00 am

How Do I Avoid Duplicates

Post by Joy » Mon Nov 24, 2008 8:59 pm

Hi,

Thank you that worked just great but now I'm trying to figure out how to avoid duplicates - right now it displays each date 2 or 3 times and I just want it to display each date once. I tried to do that by capturing the GetNextAxisLabel event but that made my webform unbelievably slow. Is there another way I could make that work?

Thank you!

Joy

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 Nov 25, 2008 7:56 am

Hi Joy,

You could try setting axis Increment as shown here.
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