Conditional colouring using kibana canvas expression editor

Try this expression and see if the element looks right:

filters
| essql
query="SELECT "system.load.1" AS LOAD FROM "metricbeat*" WHERE metricset.module = 'system' AND metricset.name = 'load' AND beat.hostname LIKE 'XXXXXX%' AND "@timestamp" <= NOW () LIMIT 1"
| metric LOAD 
  metricFont={font size=48 family="'Open Sans', Helvetica, Arial, sans-serif" color={if {lt 10} then="red" else="green"} align="center" lHeight=48} 
  labelFont={font size=14 family="'Open Sans', Helvetica, Arial, sans-serif" color="#000000" align="center"}
| render
1 Like