danimart1991 / pvpc-hourly-pricing-card

Home Assistant Lovelace custom card to use with Spain electricity hourly pricing (PVPC) integration
Apache License 2.0
89 stars 21 forks source link

Suggestion: Collapsable graph #36

Open katiuskt opened 3 years ago

katiuskt commented 3 years ago

Graph view of the card is quite useful but it takes quite space of the screen to keep it visible all the time so I wonder if it is posible to make it collapsable.

I mean, with "graph: true" option it would be great it a new "collapse_graph: true/false" could be implemented.

collapse_graph = false -> Current layout/behavior collapse_graph = true -> Card layout will be slightly different: Graph will be hidden by default but in some place in the card will be an down-arrow (I imagine it where the minimum/maximum daily price are shown, for instance). If you click on it, the card will make bigger itself and show the graph. Arrow will become an up-arrow. When you click on it again, the card shrink itself hidding the graph (and the arrow will become a down-arrow)

I think it could be great and useful because allows you a glance to the day's prices (looking at attributes isn't as visual) keeping the space used by the card to a minimum.

Thank you in advance