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

ENH: Timeplot auto scrolling #1076

Merged
merged 11 commits into from
May 9, 2024

Conversation

zdomke
Copy link
Contributor

@zdomke zdomke commented Apr 24, 2024

Follow up to #1601

Add an autoscroll feature to PyDMTimePlot and PyDMArchiverTimePlot.

When enabling autoscroll a refresh rate, timespan, and padding are provided. A QTimer is created that will call a function to shift the plot along the X-axis, always showing the given timespan. The QTimer calls this function after <refresh_rate> seconds. The padding will show that much space to the right of the rightmost datapoint.

By default the padding is 10% of the timespan. If the padding value is less than the refresh_rate, then the padding size is the refresh_rate value. This prevents getting newer data than the X-axis shows, which would cause the plot to "jump" to the right frequently.

@zdomke
Copy link
Contributor Author

zdomke commented May 7, 2024

Rebased timeplot_auto_scroll to slaclab:master

@zdomke zdomke changed the base branch from master to 2.0 May 7, 2024 22:11
@zdomke zdomke changed the base branch from 2.0 to master May 7, 2024 22:11
Copy link
Collaborator

@jbellister-slac jbellister-slac left a comment

Choose a reason for hiding this comment

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

It is different behavior from the current fixedRate update that we may want to surface in designer in a future update.

@jbellister-slac jbellister-slac merged commit 9315bca into slaclab:master May 9, 2024
19 checks passed
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 this pull request may close these issues.

2 participants