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

Bar graph height not correct in relation to previous days.

Open GeraldPape opened this issue 2 years ago • 3 comments

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

GeraldPape avatar Jun 01 '23 11:06 GeraldPape

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?

akloeckner avatar Jun 03 '23 09:06 akloeckner

lower_bound: 0 did the trick for me. Thanks!

rumblemumble avatar Jun 19 '23 09:06 rumblemumble

@GeraldPape Do you still have the issue?

ildar170975 avatar Jan 19 '24 18:01 ildar170975

No feedback within 3.5 months, closing

ildar170975 avatar May 01 '24 12:05 ildar170975