Apexchart average messes up extremas

Apexchart extremas problem. Not a serious one, but wondering if it’s just me, or if it’s a bug.

I have this (they’re some water temperatures):

I wanted to add an average to the blueish temp (as it drops weirdly in the end). Blue extremas are in seemingly random place, and the green extremas disappeared:

Still more weirdly, if I just filter out the greenish line by clicking it in the legend, the other lines look fine:

They only look fine, as it can be noted that on the above charts where the average is visible, the average gets completely different values. Neither really seems like an average. I could play a bit with the average time period, but this doesn’t seem right.

    - type: custom:apexcharts-card
      hours_12: false
      header:
        show: true
        title: Lattialämmityksen veden lämpötila
        show_states: false
      graph_span: 24h
      apex_config:
        annotations:
          position: back
          yaxis:
            - 'y': 0
              strokeDashArray: 5
              borderColor: '#5b5b5b'
              borderWidth: 1
        xaxis:
          labels:
            format: HH
          axisBorder:
            show: false
        yaxis:
          - id: käyttövesi
            decimalsInFloat: 0
          - id: menovesi
            decimalsInFloat: 0
            opposite: true
        legend:
          show: true
        grid:
          show: false
        chart:
          dropshadow:
            enabled: true
          height: 400px
          width: 90%
      series:
        - entity: sensor.onewire_20_temperature
          stroke_width: 3
          color: rgba(10,100,140,1)
          name: Menovesi
          unit: °C
          type: area
          show:
            legend_value: false
            in_header: false
            extremas: true
          extend_to: false
          yaxis_id: menovesi
        - entity: sensor.onewire_20_temperature
          stroke_width: 3
          color: rgba(10,100,140,1)
          name: Menovesi average
          unit: °C
          type: line
          group_by:
            duration: 1h
            func: avg
          show:
            legend_value: false
            in_header: false
            extremas: false
          extend_to: false
          yaxis_id: menovesi
        - entity: sensor.onewire_19_temperature
          stroke_width: 3
          color: rgba(100,200,0,1)
          name: Käyttövesi, kuuma
          unit: °C
          type: line
          show:
            legend_value: false
            in_header: false
            extremas: true
          yaxis_id: käyttövesi
      view_layout:
        column: 1
      card_mod:
        style:
          .: |
            ha-card {
              background-color: rgba(0,0,0,0.1);
              width: 1280px;
              margin: 80px;
              margin-top: -150px;
              position: absolute; 
              left: 0;
              right: 0;
              border: none;
              box-shadow: none;
              border-radius: 20px;
            }
              div#header__title {
                font-size: 17px;
                font-weight: bold;
                text-align: center;
              }