DateTime Axes X: Majorstep (& majorGrid) in seconds, minorStep (&minorGrid) in milliseconds

Sep 18, 2012 at 8:05 AM
Edited Sep 18, 2012 at 8:21 AM

Hi all,

First the code is in C#.

I tried hard to have an axe with the major step in seconds and minor step in milliseconds but I had no success!

I have values with: X = DateTime type and Y = Float type

The Gap between 2 values is 10 miliseconds.

I tried this:

DateTimeAxis axeX1 = new DateTimeAxis();
axeX1.MajorStep = (double)1/24/60/60; //1/24 = 1 hour, 1/24/60/60 = 1 second
axeX1.MinorStep = axeX1.MajorStep/10; //1/10 10 miliseconds
axeX1.StringFormat = "hh:mm:ss";
axeX1.ShowMinorTicks = true;
axeX1.MajorGridlineColor = OxyColor.FromArgb(40, 255, 255, 255);
axeX1.MajorGridlineStyle = LineStyle.Solid;
axeX1.MinorGridlineColor = OxyColor.FromArgb(20, 255, 255, 255);
axeX1.MinorGridlineStyle = LineStyle.Solid;
  

But between 2 major ticks I have a gap of 8 seconds and no minor tick between 2 major ticks.

Anyone has a solution or a way to follow for this kind of problem?

Thanks in advance.

JHN

Dec 4, 2013 at 8:39 AM
I have exactly the same problem ??


Anyone to help ?
Coordinator
Dec 9, 2013 at 9:01 PM
I think there is a fork related to this:
https://oxyplot.codeplex.com/SourceControl/network/forks/mroth/oxyplot/contribution/5446
I am awaiting some unit tests/examples on this.

There are also some issues related to DateTimeAxis:
https://oxyplot.codeplex.com/workitem/10089
https://oxyplot.codeplex.com/workitem/10045
https://oxyplot.codeplex.com/workitem/7988
Dec 10, 2013 at 2:31 PM
Thanks

it's works with the fork

it would be great to include this in the main project
Dec 10, 2013 at 6:19 PM
thanks for sharing the problem, and pointing out the essential fork.