Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 Time format for xAxis...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Chandrapnc

3 Posts

Posted - 25 May 2005 :  17:19:24  Show Profile  Reply with Quote

How can I change horizontal time axis label in military time standrad.
When I move horizontal scroll bar backward, it display time in negative value. for ex:'-1.0 0:00 1:00 2:00' range.
Is there a way to change TimeAxisLabels to 24:00 hours format?

quinncurtis

1164 Posts

Posted - 25 May 2005 :  17:49:16  Show Profile  Reply with Quote
I'm not exactly sure how you were able to come up with negative values for the time axis labels. There may something else wrong with your program. You should not start the time axis with a date/time of 1/1/1 0:0:0; this will result in numeric underflow problems. Your time axis should be in the current era, i.e. 1/1/2005 0:00:00, though dates as old as 1/1/1900 0:00:00 will also work.

The format of the date/time labels is controlled using the TimeAxisLabels.AxisLabelsFormat property, discussed in the user manual. The TIMEDATEFORMAT_24HM value is probably what you want to use. There are many, many other formats you can choose.

TimeAxisLabels xAxisLab = new TimeAxisLabels(xAxis);
xAxisLab.AxisLabelsFormat = ChartObj.TIMEDATEFORMAT_24HM;
chartVu.AddChartObject(xAxisLab);

Go to Top of Page

carlao

54 Posts

Posted - 02 Jul 2005 :  16:29:07  Show Profile  Reply with Quote
I know that AxisLabelsFormat uses many predefined constants as parameters. Is there a way to show in xAxis the reflection of my Regional Info? In other words, I would like to have a way to show data and time in xAxis as a result of my Regional Preferences, that is, the chart could assume something like using DateTimeFormatInfo.CurrentInfo. This way, when I change my culture info or if I run my application in another country, the chart will reflect the user preferences.
Thanks.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 03 Jul 2005 :  16:58:42  Show Profile  Reply with Quote
The only thing that we have that might help you out is the TimeAxisLabels.EuroAutoFormatMonthDay property of the time axis labels. Set to true will cause the time axis labels, and the auto axis labels routines to always use European (Day/Month/Year) formated time axis labels whenever US (Month/Day/Year) formated labels are normally used. Its up to you to figure out when to use according to the culture info.
Go to Top of Page

carlao

54 Posts

Posted - 07 Jul 2005 :  04:27:48  Show Profile  Reply with Quote
Suppose that I have short time in my Regional Preferences, like 3:40 PM for example. Is it possible to show this time in x Axis? I could not find a way to do that.
Thanks.

Go to Top of Page

quinncurtis

1164 Posts

Posted - 07 Jul 2005 :  09:04:01  Show Profile  Reply with Quote
You would need to check the regional preferences yourself, and set the time axis label format for those axes that you want to customize. You could use our predefined hour::minute time axis label constants TIMEDATEFORMAT_12HM or TIMEDATEFORMAT_24HM, which do not use the AM/PM designator:

TimeAxisLabels xAxisLab = new TimeAxisLabels(xAxis);
xAxisLab.AxisLabelsFormat = ChartObj.TIMEDATEFORMAT_12HM;
chartVu.AddChartObject(xAxisLab);

or you could define a custom label format, with the AM/PM designator, using a string following the conventions described in the .Net DateTimeFormatInfo class.

TimeAxisLabels xAxisLab = new TimeAxisLabels(xAxis);
xAxisLab.CustomTimeFormatString = "H:mm tt";
chartVu.AddChartObject(xAxisLab);
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07