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

Better time axis on plot view #1356

Merged
merged 5 commits into from
Feb 20, 2023
Merged

Better time axis on plot view #1356

merged 5 commits into from
Feb 20, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented Feb 19, 2023

This introduces proper grid spacing for time-series, with tick-marks every:

  • 24h
  • 12h
  • 1h
  • 10m
  • 1m
  • 10s
  • 1s

and then using 10x factor above and below that.

It also formats the datetimes better, showing only the date at midnight, and only the time elsewhere. It also cuts out seconds and milliseconds intelligently.

Before:

image

After:

image

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

@emilk emilk added ui concerns graphical user interface 📺 re_viewer affects re_viewer itself labels Feb 19, 2023
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

} else if is_whole_second {
return datetime.time().format("%H:%M:%SZ").to_string();
} else {
return datetime.time().format("%H:%M:%S.3fZ").to_string();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something's wrong with the formatting syntax here
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch, good catch!

@emilk emilk merged commit dfd32bd into main Feb 20, 2023
@emilk emilk deleted the emilk/better-plot-dates branch February 20, 2023 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📺 re_viewer affects re_viewer itself ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants