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

TimeSeries: Add zoom-out functionality on double click #68936

Merged
merged 1 commit into from
May 26, 2023

Conversation

simPod
Copy link
Contributor

@simPod simPod commented May 23, 2023

What is this feature?

When double clicking in Graph panel chart area, the timerange is zoomed out. This double-click feature was missing in TimeSeries and this PR adds it.

2023-05-24 00-50-05 2023-05-24 00_50_43

Why do we need this feature?

This brings feature parity with old Graph panel

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@simPod simPod requested a review from a team as a code owner May 23, 2023 22:52
@grafanabot grafanabot added area/frontend pr/external This PR is from external contributor labels May 23, 2023
@leeoniya
Copy link
Contributor

leeoniya commented May 23, 2023

thanks!

there's a opts.cursor.bind.dblclick API that would probably be better:

https://github.com/leeoniya/uPlot/blob/master/dist/uPlot.d.ts#L437

via:

https://github.com/grafana/grafana/blob/d68079e92757d741941a6b50dc6237b41dd2056e/packages/grafana-ui/src/components/uPlot/config/UPlotConfigBuilder.ts#L123C3-L125

@nmarrs nmarrs added area/panel/timeseries The main time series Graph panel add to changelog no-backport Skip backport of PR labels May 23, 2023
@nmarrs nmarrs added this to the 10.1.x milestone May 23, 2023
@leeoniya
Copy link
Contributor

we can also roll this into the existing ZoomPlugin, not sure how useful it is to keep it split off.

@simPod simPod changed the title TimeSeries: Add ZoomOutPlugin ZoomPlugin: Add zoom-out functionality on double click May 24, 2023
@simPod
Copy link
Contributor Author

simPod commented May 24, 2023

I think I have addressed your comments.

@leeoniya
Copy link
Contributor

I think I have addressed your comments.

did you try #68936 (comment) instead of this?

    config.addHook('setCursor', (u) => {
      u.over.ondblclick = () => {

@leeoniya leeoniya changed the title ZoomPlugin: Add zoom-out functionality on double click TimeSeries: Add zoom-out functionality on double click May 26, 2023
@leeoniya leeoniya merged commit a69ff6c into grafana:main May 26, 2023
10 checks passed
@simPod simPod deleted the zoomout branch May 26, 2023 06:31
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend area/panel/timeseries The main time series Graph panel no-backport Skip backport of PR pr/external This PR is from external contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants