Seconds display problem

Jan 31, 2014 at 3:49 PM
Edited Feb 1, 2014 at 3:52 AM
Hi!
I'm trying to screen date and time axis where MajorStep - is minutes, and MinorStep - is the interval in 5 sec.
For this I use the following code:
        plotModel = new PlotModel
        {
            IsLegendVisible = false
        };
        dateAxis = new DateTimeAxis(AxisPosition.Bottom, "Time", "HH:mm")
        {
            MajorGridlineStyle = LineStyle.Solid,
            MinorGridlineStyle = LineStyle.Dot,
            IntervalLength = 80,
            IntervalType = DateTimeIntervalType.Minutes,
            MajorStep = 1d/ 1440d,
            MinorStep = 1d / 1440d /6d,
            MinorIntervalType = DateTimeIntervalType.Seconds,
            Minimum = DateTimeAxis.ToDouble(DateTime.Now),
            Maximum = DateTimeAxis.ToDouble(DateTime.Now.AddMinutes(10)),
            IsZoomEnabled = false,
            IsPanEnabled = false,
        };
        plotModel.Axes.Add(dateAxis);
But as a result some ticks for seconds are not displayed. See the picture below:

Image

Does anybody know how to solve this problem?

I would highly appreciate any assist.
Thanks!
Feb 1, 2014 at 7:05 AM
Edited Feb 1, 2014 at 5:03 PM
I have found an easy way how to solve this problem.
In class DateTimeAxis I've corrected the value TimeOrigin from DateTime(1900, 1, 1, 0, 0, 0, DateTimeKind.Utc)
to DateTime(2000, 1, 1, 1, 1, 1, DateTimeKind.Utc) and the error was eliminated.
I hope this info will be useful for somebody!