Page 1 of 1

Format Date Display

Posted: Sun Nov 16, 2008 10:24 pm
by 9639720
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

Posted: Mon Nov 17, 2008 9:53 am
by narcis
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!

How Do I Avoid Duplicates

Posted: Mon Nov 24, 2008 8:59 pm
by 9639720
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

Posted: Tue Nov 25, 2008 7:56 am
by narcis
Hi Joy,

You could try setting axis Increment as shown here.