Conditional background in canvas doesn't work

Hi all
I want to condition my background for specific value of SQL returned, I try to have a condition for my metric color and its work but in background color its not ! can anyone explain why?
this is my expression editor for the color metrics (the one its WORK)

kibana
| selectFilter
| essql
query="SELECT max("filed-number") as num , "name" as name
From "metrics-*" group by name order by num desc limit 6"
| getCell row=3
| metric metricFormat="0,0.[000]"
metricFont={font align="center" color={switch {case if={all {gt 0} {lt 23}} then="#3f9939"} {case if={all {gte 23} {lte 26}} then="#EDFF00"} default="#FF0000"} family="'Open Sans', Helvetica, Arial, sans-serif" italic=false size=14 underline=false weight="bold"}
| render

but when I try this for background color Its not WORKING! its always take the default value (condition not work)

kibana
| selectFilter
| essql
query="SELECT max("filed-number") as num , "name" as name
From "metrics-*" group by name order by num desc limit 6"
| getCell row=3
containerStyle={containerStyle backgroundColor={switch {case if={all {gt 0} {lte 23}} then="#3f9939"} {case if={all {gt 23} {lte 26}} then="#EDFF00"} default="green"} borderRadius="32px"}

Hello,

Could you please let us know what is your stack version? cc @Catherine_Liu

Thanks,
Bhavya

its 8.11.1

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.