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

history-graph: do not show a name if only ONE graph is displayed (like it was before 2022.6.1) #12860

Closed
3 tasks done
ildar170975 opened this issue Jun 3, 2022 · 12 comments · Fixed by #14546
Closed
3 tasks done
Labels
second-opinion-wanted Add this label when a reviewer needs a second opinion from another member.

Comments

@ildar170975
Copy link
Contributor

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

If only one sensor is used in history-graph - then do NOT show a sensor's name - like it was before 2022.6.

Starting from 2022.6.1:
изображение

Describe the behavior you expected

Was before:
изображение
the 2nd picture was taken from Web.

Steps to reproduce the issue

  1. Add a history-graph with ONE sensor.

What version of Home Assistant Core has the issue?

20220.6.1

What was the last working version of Home Assistant Core?

2022.6

In which browser are you experiencing the issue with?

Chrome 102.0.5005.63

Which operating system are you using to run this browser?

Win10x64

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@ildar170975 ildar170975 changed the title history-graph: do not show a name if only ONE graph is displayed (like it was before 2022.6) history-graph: do not show a name if only ONE graph is displayed (like it was before 2022.6.1) Jun 3, 2022
@ildar170975
Copy link
Contributor Author

ildar170975 commented Jun 3, 2022

Before 2022.6:
изображение
изображение

In 2022.6:
изображение
изображение

In 2022.6.1:
изображение
изображение

As for me the initial design was much better: do NOT display a name if only one sensor is present.
Or make it customizable.

@ildar170975
Copy link
Contributor Author

ildar170975 commented Jun 3, 2022

Yes, I do know about this:
изображение
But there is a useless space on the left.
And I cannot see a specified name in a popup tooltip.

@bdraco
Copy link
Member

bdraco commented Jun 5, 2022

TLDR: This looks like it is working as originally designed, and was fixed in 2022.6 to do so.

This will restore the the lack of label.

diff --git a/src/panels/lovelace/cards/hui-history-graph-card.ts b/src/panels/lovelace/cards/hui-history-graph-card.ts
index a94a1b521..917002a94 100644
--- a/src/panels/lovelace/cards/hui-history-graph-card.ts
+++ b/src/panels/lovelace/cards/hui-history-graph-card.ts
@@ -144,7 +144,6 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
             .historyData=${this._stateHistory}
             .names=${this._names}
             up-to-now
-            no-single
           ></state-history-charts>
         </div>
       </ha-card>

However noSingle has been set since #4882 so this change looks like it was a bugfix and its now working as designed. Its also really confusing when you have multiple graphs if they don't have labels.

Screen Shot 2022-06-04 at 13 58 12

I don't think we should change it back but I'll ask other member's for a second opinion in case someone has a different opinion on this one.

@bdraco bdraco added the second-opinion-wanted Add this label when a reviewer needs a second opinion from another member. label Jun 5, 2022
@ildar170975
Copy link
Contributor Author

ildar170975 commented Jun 5, 2022

Its also really confusing when you have multiple graphs if they don't have labels.

For me, the OLD design was perfect:

  1. I usually placed a history-graph card with ONE sensor in the places where it was clear what sensor is displayed on the graph.
    There was NO need to display a name for the only sensor.
    Example (on your picture):
    изображение

  2. Also, it was useful to have a history-graph card with ONE sensor below a custom:mini-graph (described here):
    изображение
    Surely these graphs may NOT be horizontally aligned in some cases (like between 00:00 & 01:00) but that was OK.

  3. I also used a history-graph card with MANY sensors, it is RIGHT that names ARE displayed:
    изображение

The ideal way could be adding an option:
show_name: true/false
whether to display a name or not (also, the name is always displayed in a tooltip).

@bdraco
Copy link
Member

bdraco commented Jun 5, 2022

The ideal way could be adding an option:
show_name: true/false
whether to display a name or not (also, the name is always displayed in a tooltip).

That's probably the one way to accommodate the use cases here.

I didn't make this change so I don't fully understand the motivation behind it, and the above lands this into feature request territory so I'll wait for other members to comment on this as they haven't had a chance to weigh in.

@ildar170975
Copy link
Contributor Author

Thank you very much for support!

@parautenbach
Copy link

I would give my support for a new setting like that. Like Ildar, I have also such use cases.

@github-actions
Copy link

github-actions bot commented Sep 3, 2022

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 3, 2022
@ildar170975
Copy link
Contributor Author

Bump

@github-actions github-actions bot removed the stale label Sep 3, 2022
@github-actions
Copy link

github-actions bot commented Dec 4, 2022

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 4, 2022
@ildar170975
Copy link
Contributor Author

up

@github-actions github-actions bot removed the stale label Dec 4, 2022
@spacegaier
Copy link
Member

I agree that adding this option makes sense and is a low risk/effort thing. PR as a proposal is coming in a minute.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
second-opinion-wanted Add this label when a reviewer needs a second opinion from another member.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants