Author |
Topic  |
|
HorseloverFat
6 Posts |
Posted - 07 Dec 2004 : 06:35:39
|
Hi,
I have a TimeAxis that shows elapsed time with TimeAxisLabels with a format of TIMEDATEFORMAT_MSDDD. My problem is that the first tick mark label, i.e. the origin, not only shows 00:00:000 but also 1/01/01 whereas the remaining tick marks do not include the date. How can I remove this date from the first label? |
|
HorseloverFat
6 Posts |
Posted - 07 Dec 2004 : 07:14:09
|
Ok, I have some more info on this problem. I've just discovered that if I click to the left of the left-hand axis I receive the following exception:
System.ArgumentOutOfRangeException: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
This seems to be because I am clicking before the beginning of the epoch. What I'm after is a time-based axis and not a date-based axis. How can I best implement an elapsed time axis, avoid the above exception and not have a date showing in my Xaxis labels? |
 |
|
quinncurtis
1164 Posts |
Posted - 07 Dec 2004 : 11:11:11
|
We don't really have a time-only based axis that starts at zero. A starting date of 1/1/1 (i.e. the first year of the AD era calendar., not Jan. 1, 2001), is going to cause problems since charts often contains elements positioned outside of the plotting area, and the .Net DateTime object we use to track and calculate time cannot process time/dates outside of this range. So always initialize the starting date with a date within the last few centuries. You can initialize the time portion of the ChartCalendar object to be 00:00:00, just the date part will be non-zero. This will prevent out of range problem you describe.
To prevent the dates from showing, just set the TimeAxisLabels.DateCrossoverMode to NO_DATECROSSOVER. Only time labels will show up.
TimeAxisLabels xAxisLab1 = new TimeAxisLabels(xAxis1); xAxisLab1.DateCrossoverMode = ChartObj.NO_DATECROSSOVER; chartVu.AddChartObject(xAxisLab1);
You should still be able to create a chart with just time labels looking the way you want.
|
 |
|
new
14 Posts |
Posted - 09 May 2006 : 08:49:51
|
My question is exactly opposit to the ploblem stated in this topic..
I want to place date in dd/mm/yy format at start of x axis irrespective of x axis start time and also at date crossover..
I know how to place date at crossover..but is there any method for placing date at intersection of x axis also(an example will be appriciated)
Adding chart text could not be the solution because if x axis start time happens to be the date changeover time then overlapping may occur..
Thanx new |
 |
|
quinncurtis
1164 Posts |
Posted - 09 May 2006 : 09:43:39
|
Sorry, we do not know of any way of for you to program the special case that you describe, other than using a ChartText (or TimeLabel) object, which you have already ruled out. |
 |
|
|
Topic  |
|