Graph of two datasets with timeshift, bar chart with data from max of one dataset

I read the docs about charts and tried to find some examples here in the forum, but failed.

I have this two datasets:

On is the PV production (yield) per day, the other is the forecast for the next day from solcast.
I now want for every day a comparison of production and forecast.

  1. I need to make a bar chart from the max of the yield.
  2. I need to take care of the timeshift. I tried to explain this in the graph. Lets call is “Graph 1”:

I tried this in charts:

config:
  label: Vorhersage
  sidebar: true
slots:
  grid:
    - component: oh-chart-grid
      config: {}
  xAxis:
    - component: oh-time-axis
      config:
        gridIndex: 0
        name: Tag
        nameLocation: end
  yAxis:
    - component: oh-value-axis
      config:
        gridIndex: 0
        name: Erzeugung
        min: "0"
        max: "50"
        nameLocation: end
  series:
    - component: oh-aggregate-series
      config:
        name: Forecast
        gridIndex: 0
        xAxisIndex: 0
        yAxisIndex: 0
        type: bar
        item: Solcast_PV_Plane_Forecast_Tomorrow
        dimension1: date
        dimension2: month
        aggregationFunction: max
    - component: oh-aggregate-series
      config:
        gridIndex: 0
        xAxisIndex: 0
        yAxisIndex: 0
        type: bar
        name: Erzeugung
        item: KOSTALPLENTICOREPlus55withBattery_YieldDay
        aggregationFunction: max
        dimension1: date
        dimension2: month

Unfortunately, the chart is empty:

To show you that the items I choose are the correct ones, here the code of the above chart (Graph 1)

component: oh-label-cell
config:
  action: analyzer
  actionAnalyzerCoordSystem: time
  actionAnalyzerItems:
    - ForecastSolar_PV_Plane_Forecast_Tomorrow
    - Solcast_PV_Plane_Forecast_Tomorrow
    - KOSTALPLENTICOREPlus55withBattery_YieldDay
  item: ForecastSolar_PV_Plane_Forecast_Tomorrow
  title: Solar Prognose morgen
  trendItem: ForecastSolar_PV_Plane_Forecast_Tomorrow

This is how it should look like:
grafik

And this is just an example, I have different data I want to compare like this.

I had the same issue, that when using an OH item for the forecast, that the graph shows the values with the current time when the value was set/changed, but not with a timestamp that is 24h or 48h ahead. My solution is outside OpenHAB. A Shell script runs every 30 minutes, it downloads the solcast forecast json file. And this file is imported into a influx database with the timestamps from within the json file. The graph is generated using grafana.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.