home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.9k stars 2.64k forks source link

Statistics graph: lack of info in legend for "total_increasing" sensors #20029

Open ildar170975 opened 5 months ago

ildar170975 commented 5 months ago

Checklist

Describe the issue you are experiencing

After a recent PR (https://github.com/home-assistant/frontend/pull/19089) no "sum / change / state" labels are displayed in a legend:

chart_type: line
period: 5minute
type: statistics-graph
entities:
  - sensor.system_monitor_network_in
stat_types:
  - state
  - sum
  - change
days_to_show: 1

image

For total_increasing sensors it could be unclear which graph is for a "sum" etc, users have to guess.

In that mentioned PR it was proposed first to use 3 ways of showing a legend: -- full (incl. labels) -- brief (only entity names) -- none but the "full" option was refused.

Suggest to add this variant.

Describe the behavior you expected

as above

Steps to reproduce the issue

as above

What version of Home Assistant Core has the issue?

2024.3.1

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Chrome 122.0.6261.112

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

karwosts commented 5 months ago

Even if you had the full legend, you just have three bubbles but they were all the same color, so that doesn't actually help you identify which one is which?

The tooltips still show the (sum) string btw.

ildar170975 commented 5 months ago

Even if you had the full legend, you just have three bubbles but they were all the same color, so that doesn't actually help you identify which one is which?

Agree that same colors make it difficult, that is why I have to switch curves one by one to identity which one is for )). Tooltips are also informative, but I can use them only with a mouse, not on a touchscreen (personal issues). We should probably think how to differ lines visually. For min/mean/max it was a brilliant idea to use a background fill between lines. In case of state/sum/change also smth is required.

ildar170975 commented 5 months ago

Also, about tooltips. Sometimes a popup shows data for several curves - you have to select another point to find out:

image

i.e. even tooltips may be confusing.

Also, in a perfect world a total_increasing sensor is always increasing - and you may understand a graph easier. In a real world integrations may make a sensor become a zero or start decreasing (could indicate an error) - so a graph may become "strange". That is why we need a way to define which curve is for.

github-actions[bot] commented 2 months ago

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.

ildar170975 commented 2 months ago

up

ildar170975 commented 1 month ago

Bumping up the issue. It is absolutely not convenient to use the statistics-graph in case of total & "total_increasing" sensors. All lines looks same, not easy to distinguish them. image