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

Oystein Bjorke 10 years ago 0
This discussion was imported from CodePlex

JHN wrote at 2012-09-18 09:05:

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


cedrelo wrote at 2013-12-04 08:39:

I have exactly the same problem ??


Anyone to help ?

objo wrote at 2013-12-09 21:01:

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

cedrelo wrote at 2013-12-10 14:31:

Thanks

it's works with the fork

it would be great to include this in the main project

David_NET wrote at 2013-12-10 18:19:

thanks for sharing the problem, and pointing out the essential fork.