/// <summary> /// Returns a sequence of major values. /// </summary> /// <param name="availableSize">The available size.</param> /// <returns>A sequence of major values.</returns> protected virtual IEnumerable <DateTime> GetMajorAxisValues(Size availableSize) { if (!ActualRange.HasData || ValueHelper.Compare(ActualRange.Minimum, ActualRange.Maximum) == 0 || GetLength(availableSize) == 0.0) { yield break; } this.ActualInterval = CalculateActualInterval(availableSize); Range <DateTime> dateTimeRange = ToDateTimeRange(ActualRange); DateTime date = dateTimeRange.Minimum; DateTime start = AlignIntervalStart(dateTimeRange.Minimum, this.ActualInterval, ActualIntervalType); while (start < dateTimeRange.Minimum) { start = IncrementDateTime(start, this.ActualInterval); } IEnumerable <DateTime> intermediateDates = EnumerableFunctions .Iterate(start, next => IncrementDateTime(next, this.ActualInterval)) .TakeWhile(current => dateTimeRange.Contains(current)); foreach (DateTime current in intermediateDates) { yield return(current); } }