Hi everyone,
i used openHAB 3 on a Windows Machine and made an custom chart widget and this worked fine.
After i switched on Ubuntu i cant see any data in the Widget.
Anyone can help me to figure out why?
Here is my Code for the Widget:
uid: CHART_Widget
tags: []
props:
parameters:
- description: Header of the cell
label: Header
name: header
required: false
type: TEXT
- description: Icon on top of the card (only f7 icons (without f7:))
label: Icon
name: icon
required: false
type: TEXT
- context: item
label: Graph Item 1
name: graphItem1
required: false
type: TEXT
- label: Area 1 filled
name: area1filled
required: false
type: BOOLEAN
- context: item
label: Graph Item 2
name: graphItem2
required: false
type: TEXT
- label: Area 2 filled
name: area2filled
required: false
type: BOOLEAN
- context: item
label: Graph Item 3
name: graphItem3
required: false
type: TEXT
- label: Area 3 filled
name: area3filled
required: false
type: BOOLEAN
- context: item
label: Graph Item 4
name: graphItem4
required: false
type: TEXT
- label: Area 4 filled
name: area4filled
required: false
type: BOOLEAN
- context: item
label: Graph Item 5
name: graphItem5
required: false
type: TEXT
- label: Area 5 filled
name: area5filled
required: false
type: BOOLEAN
- context: item
label: Graph Item 6
name: graphItem6
required: false
type: TEXT
- label: Area 6 filled
name: area6filled
required: false
type: BOOLEAN
parameterGroups:
- name: action1
context: action
label: Action1
- name: action2
context: action
label: Action2
- name: action3
context: action
label: Action3
- name: action4
context: action
label: Action4
- name: action5
context: action
label: Action5
- name: action6
context: action
label: Action6
timestamp: Apr 4, 2023, 3:09:17 PM
component: f7-card
config:
key: =Math.random() + items[props.graphItem1].state.split(" ")[0] + items[props.graphItem2].state.split(" ")[0] + items[props.graphItem3].state.split(" ")[0] + items[props.graphItem4].state.split(" ")[0] + items[props.graphItem5].state.split(" ")[0] + items[props.graphItem6].state.split(" ")[0]
style:
background-color: rgba(0,0,0,0)
border-radius: var(--f7-card-expandable-border-radius)
box-shadow: 5px 5px 10px 1px rgba(0,0,0,0.1)
margin-left: 5px
margin-right: 5px
noShadow: false
padding: 0px
slots:
content:
- component: f7-block
config:
style:
display: flex
flex-direction: row
left: 16px
position: absolute
top: -5px
slots:
default:
- component: f7-icon
config:
f7: =props.icon
size: 18
style:
margin-right: 10px
visible: "=props.icon ? true : false"
- component: Label
config:
style:
font-size: 12px
margin-top: 0px
text: "=props.header ? props.header : ''"
default:
- component: oh-chart
config:
options:
color:
- rgba(255,0,0,1)
- rgba(0,255,255,1)
- rgba(0,255,0,1)
period: D
periodVisible: false
slots:
dataZoom:
- component: oh-chart-datazoom
config:
show: true
type: inside
grid:
- component: oh-chart-page
config:
containLabel: true
height: 85%
includeLabels: true
left: 20px
show: false
top: 16px
width: 95%
legend:
- component: oh-chart-legend
config:
bottom: 0px
show: true
type: scroll
series:
- component: oh-time-series
config:
action: navigate
actionPropsParameterGroup: action1
areaStyle:
opacity: "=props.area1filled ? 0.2 : 0.0"
item: =props.graphItem1
markPoint:
data:
- name: Max
type: "=props.item1max ? 'max' : ''"
- name: Min
type: "=props.item1min ? 'min' : ''"
- name: Average
type: "=props.item1average ? 'average' : ''"
name: =props.graphItem1
smooth: true
type: line
xAxisIndex: 0
yAxisIndex: 0
- component: oh-time-series
config:
action: navigate
actionPropsParameterGroup: action2
areaStyle:
opacity: "=props.area2filled ? 0.2 : 0.0"
gridIndex: 0
item: =props.graphItem2
markPoint:
data:
- name: Max
type: "=props.item2max ? 'max' : ''"
- name: Min
type: "=props.item2min ? 'min' : ''"
- name: Average
type: "=props.item2average ? 'average' : ''"
name: =props.graphItem2
smooth: true
type: line
xAxisIndex: 0
yAxisIndex: 0
- component: oh-time-series
config:
action: navigate
actionPropsParameterGroup: action3
areaStyle:
opacity: "=props.area3filled ? 0.2 : 0.0"
item: =props.graphItem3
markPoint:
data:
- name: Max
type: "=props.item3max ? 'max' : ''"
- name: Min
type: "=props.item3min ? 'min' : ''"
- name: Average
type: "=props.item3average ? 'average' : ''"
name: =props.graphItem3
smooth: true
type: line
xAxisIndex: 0
yAxisIndex: 0
- component: oh-time-series
config:
action: navigate
actionPropsParameterGroup: action4
areaStyle:
opacity: "=props.area4filled ? 0.2 : 0.0"
item: =props.graphItem4
markPoint:
data:
- name: Max
type: "=props.item4max ? 'max' : ''"
- name: Min
type: "=props.item4min ? 'min' : ''"
- name: Average
type: "=props.item4average ? 'average' : ''"
name: =props.graphItem4
smooth: true
type: line
xAxisIndex: 0
yAxisIndex: 0
- component: oh-time-series
config:
action: navigate
actionPropsParameterGroup: action5
areaStyle:
opacity: "=props.area5filled ? 0.2 : 0.0"
item: =props.graphItem5
markPoint:
data:
- name: Max
type: "=props.item5max ? 'max' : ''"
- name: Min
type: "=props.item5min ? 'min' : ''"
- name: Average
type: "=props.item5average ? 'average' : ''"
name: =props.graphItem5
smooth: true
type: line
xAxisIndex: 0
yAxisIndex: 0
- component: oh-time-series
config:
action: navigate
actionPropsParameterGroup: action6
areaStyle:
opacity: "=props.area6filled ? 0.2 : 0.0"
item: =props.graphItem6
markPoint:
data:
- name: Max
type: "=props.item6max ? 'max' : ''"
- name: Min
type: "=props.item6min ? 'min' : ''"
- name: Average
type: "=props.item6average ? 'average' : ''"
name: =props.graphItem6
smooth: true
type: line
xAxisIndex: 0
yAxisIndex: 0
tooltip:
- component: oh-chart-tooltip
config:
confine: true
orient: vertical
show: true
smartFormatter: true
xAxis:
- component: oh-time-axis
config:
gridIndex: 0
yAxis:
- component: oh-value-axis
config:
gridIndex: 0
Basically its this Widget Chart but i added a few things.