Hi together,
I try to create a Widget that shows multiple Temperature Curves in a Diagram for Placement on e.g. a Page.
I have written the below Widget. It works if I put multiple oh-time-series in the series-Property of the oh-chart component.
But I would like to use the oh-repeater to show a series for each Item in a group or for each item with a given Tag.
The oh-repater Part works with list-items in a oh-list. But it seems it does not work for oh-time-series in an oh-chart series-Property.
Am I doing something wrong?
Any hints?
I added a Screenshot. The base Diagram Controls are Visible, but the Series are missing.
Thanks in Advance.
JoeD
yaml
uid: widget_db26662fce_ChartWidget
tags: []
props:
parameters:
- description: A text prop
label: Prop 1
name: prop1
required: false
type: TEXT
- context: item
description: An item to control
label: Item
name: item
required: false
type: TEXT
parameterGroups: []
timestamp: Jun 8, 2021, 9:18:20 PM
component: f7-card
config:
title: '=(props.item) ? "State of " + props.item : "Set props to test!"'
footer: =props.item
slots:
content:
- component: oh-chart
config:
chartType: dynamic
period: 2D
slots:
grid:
- component: oh-chart-grid
config:
includeLabels: true
xAxis:
- component: oh-time-axis
config:
gridIndex: 0
yAxis:
- component: oh-value-axis
config:
gridIndex: 0
name: °C
scale: true
series:
- component: oh-repeater
config:
for: item
groupItem: gTemperaturenAussen
sourceType: itemsInGroup
slots:
default:
- component: oh-time-series
config:
name: =loop.item.name
gridIndex: 0
xAxisIndex: 0
yAxisIndex: 0
type: line
item: =loop.item.name
tooltip:
- component: oh-chart-tooltip
config:
confine: true
smartFormatter: true
legend:
- component: oh-chart-legend
config:
bottom: 3
type: scroll
dataZoom:
- component: oh-chart-datazoom
config:
type: inside
- Platform information:
- Hardware: 2GB Ram
- OS: openHABian
- Java Runtime Environment:
javaVersion: 11.0.11
javaVendor: Azul Systems, Inc.
javaVendorVersion: Zulu11.48+21-CA - openHAB version: openHAB 3.1.0.M5