Time formatting for axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Adrian
Advanced
Posts: 116
Joined: Thu Jun 23, 2005 4:00 am

Time formatting for axis

Post by Adrian » Thu Feb 01, 2007 2:30 am

It appears there is a minor problem with time formatting on an axis. I want the time to be represented using a single digit for hour e.g. 1:15:45 not 01:15:45. This should be achievable using a format of h:mm:ss however this doesn't work. To get it to work a space needs to be inserted before the h e.g. _h:mm:ss where _ is space.
Adrian Heald
Captell Developments
www.captelldevelopments.com

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Thu Feb 01, 2007 11:38 am

Hi Adrian,

Which TeeChart version are you using?
It works fine here using latest release (Build 2.0.2586.24038)

Can you see if in your version the below code, it's woorking fine, please ?

Code: Select all

	private void Form1_Load(object sender, EventArgs e)
        {
            bar1.XValues.DateTime = true;

            tChart1.Axes.Bottom.Labels.DateTimeFormat = "h:mm:ss";
            
            DateTime[] dates = new DateTime[5];

            dates[0] = Convert.ToDateTime("1/1/07 07:00:00");
            dates[1] = Convert.ToDateTime("1/1/07 08:00:00");
            dates[2] = Convert.ToDateTime("1/1/07 09:00:00");
            dates[3] = Convert.ToDateTime("1/1/07 10:00:00");
            dates[4] = Convert.ToDateTime("1/1/07 11:00:00");

            for (int i = 0; i < 5; i++)
            {
                bar1.Add(dates[i], i);                
            }

            
        }
Last edited by Edu on Tue Apr 10, 2007 9:11 am, edited 1 time in total.
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Adrian
Advanced
Posts: 116
Joined: Thu Jun 23, 2005 4:00 am

Post by Adrian » Thu Feb 01, 2007 10:23 pm

I'm using the Jan30th build... sorry my dev machine is down at the moment and I cant check the version. I'm trying to set the format using the chart editor... it definately doesn't work with just the single h needs a space and the h.
Adrian Heald
Captell Developments
www.captelldevelopments.com

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Fri Feb 02, 2007 9:19 am

Hi Adrian

Here it's working fine using the Jan30th build at run-time and design-time. could you please send us a simple example project we can run "as-is" to reproduce the issue here?

You can post your files either at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Post Reply