[SOLVED] Chart buttons won't toggle

I have made a chart that displays the temperature over a period of time.
However I want to have 1 chart with 4 buttons to show different data (hour, day, week, month).
But for now I get 4 charts below each other, and the buttons on top won’t work.
The charts all work fine.

This is my sitemap:

                Frame {
                Switch item=C_chart_period label="Grafiek" mappings=[0="Uur", 1="Dag", 2="Week", 3="Maand"]
                Chart item=C_Basement_Temperature period=h refresh=6000 visibility=[chart_period==0, chart_period=="Uninitialized"]
                Chart item=C_Basement_Temperature period=D refresh=12000 visibility=[chart_period==1]
                Chart item=C_Basement_Temperature period=W refresh=30000 visibility=[chart_period==2]
                Chart item=C_Basement_Temperature period=M refresh=30000 visibility=[chart_period==3]

This is my .items

Number C_chart_period "Grafiek" <poweroutlet> (C_Basement)

This is the error my log is getting:

2019-03-17 21:18:07.963 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve visibility item chart_period for widget org.eclipse.smarthome.model.sitemap.Chart

These names do not match. Try

Chart item=C_Basement_Temperature period=h refresh=6000 visibility=[C_chart_period==0, C_chart_period=="Uninitialized"]
1 Like

After a restart it now works (thanks!), however the hour chart won’t display anymore.
Other charts still work fine.
I get this error:

[WARN ] [thome.ui.internal.chart.ChartServlet] - Chart generation failed: null

Edit: After a second reboot everything seems to work fine. Thank you for your assistance!

You might want to use [C_chart_period==0, C_chart_period==“NULL”] unless you’ve some reason to think your Number Item is going to be set to that string value