I’ve been diving into setting up charts in the OH2 app using the demo information provided, and while it’s been a fascinating learning experience, I’ve encountered a few hurdles that I’d love to share and get some insights on.
Starting off, I was inspired by the single chart period functionality in the demo sitemap, where you can switch between Hour, Day, or Week views by pressing a button. It looked so clean and intuitive! But when I tried to replicate this in my own site map, I ended up with three charts stacked one below the other instead of a single, dynamic chart. Here’s what my current setup looks like:
Frame label=“Weather” { Text item=Weather_Temperature valuecolor=[Weather_LastUpdate==“NULL”=“lightgray”,Weather_LastUpdate>90=“lightgray”,>25=“orange”,>15=“green”,>5=“orange”,<=5=“blue”] { Frame { Text item=Weather_Temp_Max valuecolor=[>25=“orange”,>15=“green”,>5=“orange”,<=5=“blue”] Text item=Weather_Temp_Min valuecolor=[>25=“orange”,>15=“green”,>5=“orange”,<=5=“blue”] Text item=Weather_LastUpdate visibility=[Weather_LastUpdate>30] valuecolor=[Weather_LastUpdate>120=“orange”, Weather_LastUpdate>300=“red”] } Frame { Switch item=gWeather_Chart_Period label=“Chart Period” icon=“chart” mappings=[0=“Hour”, 1=“Day”, 2=“Week”] Chart item=gWeather period=h refresh=600 visibility=[gWeather_Chart_Period==0] Chart item=gWeather period=D refresh=900 visibility=[gWeather_Chart_Period==1, gWeather_Chart_Period==“NULL”] Chart item=gWeather period=W refresh=3600 visibility=[gWeather_Chart_Period==2] } } }