I have the below oh-chart, which worked fine up to and including OH 5.1. With the update to OH 5.2. I don’t get any x-axis labels anymore (rest is still fine). The markline vanished as well, this is most probably caused by the previous issue.
- component: oh-chart
config:
period: 3D
slots:
grid:
- component: oh-chart-grid
config:
bottom: 10%
containLabel: true
left: 0%
right: 0%
top: 7%
legend:
- component: oh-chart-legend
config:
bottom: 0
series:
- component: oh-data-series
config:
data: =JSON.parse(items['open_meteo_forecast'].state).hourly.diffuse_radiation_instant
gridIndex: 0
markLine:
data:
- xAxis: =Number((items.Vir_Uhrzeit.displayState).split(":")[0])
lineStyle:
color: gray
type: dashed
width: 1
silent: true
symbol:
- none
- none
name: Indirekt
type: line
xAxisIndex: 0
yAxisIndex: 0
- component: oh-data-series
config:
data: =JSON.parse(items['open_meteo_forecast'].state).hourly.direct_radiation_instant
gridIndex: 0
name: Direkt
type: line
xAxisIndex: 0
yAxisIndex: 0
xAxis:
- component: oh-category-axis
config:
axisLabel:
formatter: =value=>value.split("T")[1].split(":")[0]
data: =JSON.parse(items['open_meteo_forecast'].state).hourly.time
gridIndex: 0
yAxis:
- component: oh-value-axis
config:
gridIndex: 0
I’m not 100% sure this is spec compliant or break is simply caused due to my setup?!
Changing the oh-category-axis as below, ends up in getting the x-axis back. But it looks like the data string is not executed, but rather taken as a string. I would expect this behavior just without the equal sign ..
- component: oh-category-axis
config:
categoryType: values
data: =JSON.parse(items['open_meteo_forecast'].state).hourly.time
gridIndex: 0
Thanks a lot for any hint!
