Change Statistics Graph Card Height

Hi,

is there any way to change the this card height?

I’m trying with card-mod, but the new height is ignored.

            ha-card {
                 height: 1000px;
              }

It only changes the height if I change the width, but horizontal part of the graph is left out of the card.

            ha-card {
                 width: 1000px;
              }

Thanks

  1. Usually to change a card’s height an “!important” modifier is required.
  2. For this particular case: what do you want to achieve? Resizing a graph is causing stretching (for text too). What you can do is increasing spaces between a title, a legend and the graph.

Thanks for the answer.

Using “!important” the card height change but the internal graph keeps the size.

My goal is this:

See my answer above about stretching the graph. Make a screenshot of any graph and then stretch the picture in smth like MS Paint - you will see what may happen.

Yes Yes, I understand.

This card_mod style will just restrict the height of the canvas element the chart renders within.

  style:
    statistics-chart$ha-chart-base$: |
      canvas {
        max-height: 300px !important;
      }