Ejemplo n.º 1
0
		/// <summary>
		/// Determine the value for any minor tic.
		/// </summary>
		/// <remarks>
		/// This method properly accounts for <see c_ref="Scale.IsLog"/>, <see c_ref="Scale.IsText"/>,
		/// and other axis format settings.
		/// </remarks>
		/// <param name="baseVal">
		/// The value of the first major tic (floating point double).  This tic value is the base
		/// reference for all tics (including minor ones).
		/// </param>
		/// <param name="iTic">
		/// The major tic number (0 = first major tic).  For log scales, this is the actual power of 10.
		/// </param>
		/// <returns>
		/// The specified minor tic value (floating point double).
		/// </returns>
		override internal double CalcMinorTicValue( double baseVal, int iTic )
		{
			XDate xDate = new XDate( baseVal );

			switch ( _minorUnit )
			{
				case DateUnit.Year:
				default:
					xDate.AddYears( iTic * _minorStep );
					break;
				case DateUnit.Month:
					xDate.AddMonths( iTic * _minorStep );
					break;
				case DateUnit.Day:
					xDate.AddDays( iTic * _minorStep );
					break;
				case DateUnit.Hour:
					xDate.AddHours( iTic * _minorStep );
					break;
				case DateUnit.Minute:
					xDate.AddMinutes( iTic * _minorStep );
					break;
				case DateUnit.Second:
					xDate.AddSeconds( iTic * _minorStep );
					break;
			}

			return xDate.XLDate;
		}
Ejemplo n.º 2
0
Archivo: XDate.cs Proyecto: CareyGit/jx
		/// <summary>
		/// The Copy Constructor
		/// </summary>
		/// <param name="rhs">The GraphPane object from which to copy</param>
		public XDate( XDate rhs )
		{
			_xlDate = rhs._xlDate;
		}