Colorize by thresholds

Hello,

I’m trying to apply colors by the status received in a query (it could be 1, 2 or 3). This is what I have:

    {
      "$$hashKey": "object:508",
      "alias": "",
      "align": "auto",
      "colorMode": "row",
      "colors": [
        "#73BF69", # Green
        "#C4162A",# Red
        "#8c8787"  # Gray
      ],
      "dateFormat": "YYYY-MM-DD HH:mm:ss",
      "decimals": 0,
      "mappingType": 1,
      "pattern": "Status Code",
      "thresholds": [
        1,
        2,
        3
      ],
      "type": "number",
      "unit": "short"
    }

The thing is that it’s not applying the right colors. 1 should be green, 2 red and 3 gray as described in the colors array.

It applies red to 1 and gray to 2 and 3.

Do you know what can be the problem?

Thank you.

Which visualization are you trying to “colorize”?

Thank you for your answer.

I don’t have visualization selected from the settings panel.
It’s a table done with the result of a query in format as table way.

The option with the thresholds is the following one:

So this is an alert rule?

It will be for alerting, yes.

I get the info from the database and I populate here.

I wanna show the successful data in green: they have a field with the integer 1.
And the rest of data is failure with integer 2 that will have the red color.
And rest of statuses with with number 3. They will have other color. Gray for example.