kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
3k stars 233 forks source link

Bar graph height not correct in relation to previous days. #973

Closed GeraldPape closed 5 months ago

GeraldPape commented 1 year ago

Using a BAR graph, the current day bar height is way to less.

the far right bar shall present a value of 3.072 Wh, the bar to the left 4.974Wh grafik

      - type: custom:mini-graph-card
        aggregate_func: max
        color_thresholds:
          - color: '#900D09'
            value: 1000
          - color: '#f1c232'
            value: 2000
          - color: '#b6d7a8'
            value: 3000
          - color: '#6aa84f'
            value: 4000
        color_thresholds_transition: hard
        entities:
          - sensor.balkon_yieldday
        group_by: date
        hour24: true
        hours_to_show: 168
        name: Tägliche Produktion
        show:
          fill: fade
          graph: bar
          labels: false
        smoothing: false
akloeckner commented 1 year ago

I think, this is due to the current day not being "complete". That results in today's value being by far the lowest of all days. And since the y axis limits are tied to the data range, this smallest value is essentially rendered as a bar of zero height.

Maybe try setting the lower_bound to 0?

rumblemumble commented 1 year ago

lower_bound: 0 did the trick for me. Thanks!

ildar170975 commented 8 months ago

@GeraldPape Do you still have the issue?

ildar170975 commented 5 months ago

No feedback within 3.5 months, closing