ON / OFF values in aggregated charts

Hi all,

I’ve found this openhab demo example for room temperatures.
https://demo.openhab.org/settings/pages/chart/chart_example

I’ve wanted to add a bar into it that says if the heating was on or off (use power switch) but it’s never displayed.

Anyone has an example where aggregated and not aggregated times are in a common chat, or if not then can tell me how to aggregate ON/OFF?

thanks
/FranzS

Are you sure it’s not displayed? ON/OFF will be rendered as 1/0 when charted. If you are adding this to an axis that already has temperature range values on it then it is likely just “squashed” down on the horizontal axis. Try creating a separate y axis for it and adding it to that (there are a few good examples on the forum for that).

I’m not sure if it’s rendered to 1/0 (see nan in Screenshot)
there is already a separate X axis.

that’s what i’ve added

    - component: oh-aggregate-series
      config:
        name: PowerOn
        gridIndex: 0
        xAxisIndex: 0
        yAxisIndex: 1
        type: bar
        item: KlimaBad_Power
        dimension1: hour
        areaStyle: {}
    - component: oh-time-series
      config:
        name: KlimaBad_Power
        gridIndex: 0
        xAxisIndex: 0
        yAxisIndex: 1
        type: line
        areaStyle: {}
        item: KlimaBad_Power
      slots:
        markArea:
          - component: oh-mark-area
            config:
              name: KlimaBad_Power
              item: KlimaBad_Power