mini-graph-card icon indicating copy to clipboard operation
mini-graph-card copied to clipboard

Optionally show y-axis and x-axis values outside of graph

Open JoryHogeveen opened this issue 3 years ago • 14 comments

Just like the core statistics graph it would be nice to be able to show the axis values outside of the graph. Things like time etc. would be more much clear :)

https://www.home-assistant.io/lovelace/statistics-graph/

Note: I cannot use the statistics graph since it only supports long-term statistics, not all sensors are supported.

JoryHogeveen avatar Feb 23 '22 11:02 JoryHogeveen

This feature sadly enough doesn't fit well with the design language we have in mind for the card, unless I misunderstand your request. Could you give a more concrete example that would need this? Thanks for your contribution!

jlsjonas avatar Mar 06 '22 09:03 jlsjonas

Hi @jlsjonas

What do you mean with that it wouldn't fit in the current design langauge? This would be an extra for the graph (below or beside it), not a modification. You also already have the min and max value used in the graph so for the Y axis you can easily calculate the values in between. The X axis would probably always be a time/date based grid I suppose?

Examples:

Current: image

With X-axis as days/time (see below): image

With both X-axis and Y-axis: image

With both X-axis and Y-axis with an extra secondary Y-axis on the right: image

JoryHogeveen avatar Mar 07 '22 13:03 JoryHogeveen

The principles behind mini graph card is to be quite simple & clean, however I can see enough benefit towards considering at least x axis to provide better user feedback.

jlsjonas avatar Mar 07 '22 15:03 jlsjonas

Completely understand :) hence I think this should always be opt-in. The Y axis can definitely enhance the UX when aggregating two separate charts (using a secondary entity) but indeed the X-axis would be the main feature as this will give some time context in an overview.

I also think it might be of great help to show the graph lines of these axis pointers on hover, similar to the graph card in HA core:

image

JoryHogeveen avatar Mar 07 '22 16:03 JoryHogeveen

I would love x and y-axis also :-)

image

Grey-Lancaster avatar May 30 '22 17:05 Grey-Lancaster

I would also love this feature, it's the main thing that causes me to go to ApexCharts rather than mini-graph-card.

xthursdayx avatar Aug 20 '22 02:08 xthursdayx

I'd vote for this as well. I've changed all my dashboards to use the mini graph. However, the complete lack of any time context makes them fairly impractical, as beautiful as they are, so I'm researching other options now. The best "workaround" is to add in the title the time range represented. Anything that is around 24hours is understandable but beyond that, you are pushing the limits of the current design. Another option is if you switch to the bar chart mode, then anything up to a week is also useful. My sense is the graph was originally envisioned to give you the 'trend' of very recent changes, a few hours to a day and for that it is absolutely amazing.

ncd7 avatar Jan 20 '24 15:01 ncd7

Just as an update for others seeking the same feature. I've completely switched to apex cards which has x/y axis management and much much more features :) Hopy this helps!

JoryHogeveen avatar Jan 20 '24 18:01 JoryHogeveen

Apex is ok, but is much slower/heavier then mini-graph-card.

teklabania avatar Jan 21 '24 19:01 teklabania

Apex is ok, but is much slower/heavier then mini-graph-card.

Didn't have such issues with it tbh. Then again, because it can support many things I can imagine that based on your config it could get heavier on your system, which is only logical.

JoryHogeveen avatar Jan 21 '24 20:01 JoryHogeveen