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

Add optional buttons to scroll in the x axis #9

Closed
dbuezas opened this issue Nov 17, 2021 · 2 comments
Closed

Add optional buttons to scroll in the x axis #9

dbuezas opened this issue Nov 17, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@dbuezas
Copy link
Owner

dbuezas commented Nov 17, 2021

[from xalex75 in the HA community]

Hi.
I just saw the reply in issues section.
There you proposed something little different from what you realized here, buttons for shifting back he view, not just for changing hours to view.
On the screen they look the same, so probably using both at the same time could be a little confusing.
What about left and right buttons for shifting the view back or forward for the amount of hours selected?
I don’t know if this would be something that would require too much work or not, I’m just asking from the user point of view 😉

@dbuezas dbuezas added the enhancement New feature or request label Nov 18, 2021
@dbuezas
Copy link
Owner Author

dbuezas commented Feb 1, 2023

Here's a way of doing this that just became possible in v3

type: custom:plotly-graph-dev
hours_to_show: 6h
entities:
  - entity: sensor.openweathermap_temperature
layout:
  updatemenus:
    - buttons:
        - args:
            - xaxis.range
            - $fn({getFromConfig}) => getFromConfig("visible_range").map(t => t - 1000*60*60)
          label: <
          method: relayout
        - args:
            - xaxis.range
            - $fn({getFromConfig}) => getFromConfig("visible_range").map(t => t + 1000*60*60)
          label: '>'
          method: relayout
      direction: right
      active: -1
      pad:
        r: 10
        t: 10
      showactive: true
      type: buttons
      x: 1
      xanchor: right
      'y': 1
      yanchor: top

@dbuezas
Copy link
Owner Author

dbuezas commented Feb 3, 2023

Transferred to Show&Tell #231

@dbuezas dbuezas closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant