On openHAB 3.1.0.M3, I’m still fiddling around with the new oh_chart component, which is actually working fine so far.
I now see that the line color of a time series doesn’t match the color shown in the legend. I set the color manually.
So, the green line actually belongs to the green line, but shows blue in the legend.
component: f7-card
config:
title: Temperaturen
style:
background-color: rgba(6,25,36)
border-radius: 20px
height: 360px
--text-color: rgba(255,255,255,1)
--font-size: 16px
--line-height: 20px
color: var(--text-color)
slots:
default:
- component: oh-chart
config:
period: M
options:
backgroundColor: rgb(6,25,36)
slots:
grid:
- component: oh-chart-grid
config: {}
xAxis:
- component: oh-time-axis
config:
gridIndex: 0
yAxis:
- component: oh-value-axis
config:
gridIndex: 0
series:
- component: oh-time-series
config:
name: Schlafzimmer
gridIndex: 0
xAxisIndex: 0
yAxisIndex: 0
type: line
item: Thermo_Schlafzimmer_Temperatur
lineStyle:
color: rgb(86,165,75)
- component: oh-time-series
config:
name: Wohnzimmer
gridIndex: 0
xAxisIndex: 0
yAxisIndex: 0
type: line
item: Thermo_Wohnzimmer_Temperatur
lineStyle:
color: rgb(224,47,68)
- component: oh-time-series
config:
name: Garten
gridIndex: 0
xAxisIndex: 0
yAxisIndex: 0
type: line
item: Thermo_Garten_Temperatur
lineStyle:
color: rgb(30,94,192)
legend:
- component: oh-chart-legend
config:
show: true
orient: horizontal
bottom: "8"
textStyle:
color: "#FFFFFF"
icon: circle
Anyone an idea how to match it again?
I haven’t found anything in the documentation of eCharts.