I’m hoping someone has experience with getting Grafana panels into the Lovelace front end. I’ve been able to make it work, but it’s not very pretty. I get the best results using an iframe card and a link to the panel from the Grafana share option.
Play with the aspect ratio. The graph itself is close to 43%. No idea about the window around it due to the scroll bar, but that would be a good place to start.
Thanks for the suggestion @tom_l, certainly 50% aspect ratio isn’t great. With 80% it is a bit more legible, but it doesn’t address the big border - it actually made it worse along the bottom:
Thanks @tom_l for the suggestion, but that doesn’t help. The Lovelace iframe card just adapts its vertical height for whatever aspect ratio I set, but there is always a scroll bar.
Looking closely, the scroll bar actually appears to be part of the grafana graph not home assistant. Can you specify the legend be a list on the graph instead of under it?
Awesome - thanks @andrewdolphin - that did the trick. Upgrading Grafana to the current version (6.2.5) fixed the scrollbar problem.
I did have to fix one thing: the new version must have introduced some new security features, one of which is to disable embedding Grafana panels in an iframe by default. Setting the environment variable GF_SECURITY_ALLOW_EMBEDDING=true in the docker container sorted this out.
Thanks all. Now I’m good to go nuts with Grafana charts in Lovelace cards!
On a similar point (or not? I’m just starting out with Grafana) how can I get rid of the scroll bars in Grafana itself. They are showing but there is nowhere to scroll so are a bit redundant.
I was never happy with the iframe as I could never get it to look or update the way I wanted. I opted instead to use mutliple Command Line Sensors to grab the most recent graph images. I then have those images as part of a Generic Camera. After this I populate the images in my lovelace as a Picture Glance Card.
I also provide a link to the actual Grafana app to access more details if I need.