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

Button to reset chart zoom #23469

Merged
merged 2 commits into from
Dec 30, 2024
Merged

Button to reset chart zoom #23469

merged 2 commits into from
Dec 30, 2024

Conversation

MindFreeze
Copy link
Contributor

Proposed change

Button is only shown on numeric state charts. Also flipped the zoom axis on the "Individual devices total usage" graph so it properly zooms in y now

image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@MindFreeze
Copy link
Contributor Author

@marcinbauer85

@KNXBroker
Copy link

Just mentioned this missing feature on discord 😄 thank you for your work!! Most likely there is a reason, why not going for double tab/click? Could be used on all type of charts.

@MindFreeze
Copy link
Contributor Author

We may add double click in the future. It just requires more work

@bramkragten bramkragten merged commit be84988 into dev Dec 30, 2024
15 checks passed
@bramkragten bramkragten added this to the 2025.1 milestone Dec 30, 2024
@bramkragten bramkragten deleted the reset-zoom branch December 30, 2024 10:52
bramkragten pushed a commit that referenced this pull request Dec 30, 2024
@ildar170975
Copy link
Contributor

ildar170975 commented Jan 4, 2025

Should it be added to a timeline graph as well?
If there is a zoom feature for them - then probably this button needed as well.
(but have no idea where to show it... so, may be adding it will make graphs & cards worse)

@MindFreeze
Copy link
Contributor Author

no room on timeline charts. This button is redundant so not a big deal. Also we'll see if we can add double tap which will make this btn extra redundant

@karwosts
Copy link
Contributor

karwosts commented Jan 5, 2025

Why do you want to zoom individual devices total on Y? Shouldn't it also be X? I'm not sure why this would be intended.

individual-zoom

@MindFreeze
Copy link
Contributor Author

Why do you want to zoom individual devices total on Y? Shouldn't it also be X? I'm not sure why this would be intended.

if the zooming worked properly it would change the scale of X. There is an open PR in the lib to fix this.
Zooming X here made no sense as you would only see part of the bars

@karwosts
Copy link
Contributor

karwosts commented Jan 5, 2025

I know people sometimes want to zoom the X scale to see more detail on their small consumers, when the chart is dominated by one huge bar (like an electric car). Sounds like we need the "open PR in the lib" to achieve this.

Thanks for the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants