Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tick generator: NumericManual should have a complimentary DateTimeManaul #4383

Closed
swharden opened this issue Oct 24, 2024 · 2 comments · Fixed by #4468
Closed

Tick generator: NumericManual should have a complimentary DateTimeManaul #4383

swharden opened this issue Oct 24, 2024 · 2 comments · Fixed by #4468

Comments

@swharden
Copy link
Member

Presently this works but it uses the "ToOADate" hack

ScottPlot.TickGenerators.NumericManual tickGenX = new();
tickGenX.AddMajor(myDateTime.ToOADate(), $"{dt1}");
@swharden
Copy link
Member Author

swharden commented Oct 24, 2024

An alternative quick fix could be to provide Add() overloads which accept DateTime

public void AddMajor(double position, string label)
{
Add(Tick.Major(position, label));
}
public void AddMinor(double position)
{
Add(Tick.Minor(position));
}

@swharden
Copy link
Member Author

Related, Axes.SetLimits() should have overloads that accept DateTime

swharden added a commit that referenced this issue Nov 9, 2024
swharden added a commit that referenced this issue Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant