To do a chart that is subdivided by temperature clusters, what you want to do is create one field (let's call it temprange) with different values. That way you can use | stats list(error) by temprange to get what you want.
...your search for data...
| eval temprange=case(temperature>=19 AND temperature<=21,"low",temperature>21 AND temperature<=22,"medium",temperature>22 AND temperature<=23,"high",1=1,"out of range")
| stats list(error) as Errors count by temprange
(Assuming that the temperature field is numeric; you don't want to compare numbers using strings as you've listed above. If not, use the convert function on it: | convert auto(temperature) before doing the eval/case statement.)