How to define width of bar/cell and the number of bar/cells per row in each stat panel?

I’m attempting to get a stat panel setup for each network switch where the up/down grid shown matches the physical layout of the switch. The panel seems to change the number shown per row dependent on the size of the panel, that is, as the panel is resized the horizontal number shown changes. I can query the device and get the desired width into a variable if needed.

How can I hard code the width or the row? Can I also hardcode the “cell” size? Not sure if cell is the proper term, image attached.

JSON below.

Screenshot_20230425_170128

{
  "id": 29,
  "gridPos": {
    "h": 8,
    "w": 12,
    "x": 0,
    "y": 0
  },
  "type": "stat",
  "title": "Switch $instance",
  "datasource": {
    "type": "prometheus",
    "uid": "G7Htlqv4k"
  },
  "pluginVersion": "9.2.1",
  "links": [
    {
      "title": "Test link title ",
      "url": "https://localhost/grafana/d/somedash/${interface:queryparam}"
    }
  ],
  "fieldConfig": {
    "defaults": {
      "mappings": [
        {
          "options": {
            "1": {
              "color": "dark-green",
              "index": 0,
              "text": "UP"
            },
            "2": {
              "color": "dark-red",
              "index": 1,
              "text": "DOWN"
            }
          },
          "type": "value"
        }
      ],
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          },
          {
            "color": "red",
            "value": 80
          }
        ]
      },
      "links": [
        {
          "targetBlank": true,
          "title": "Show details test",
          "url": "https://localhost/grafana/d/dashboard_id/${interface:queryparam}"
        }
      ],
      "unit": "short"
    },
    "overrides": []
  },
  "options": {
    "reduceOptions": {
      "values": false,
      "calcs": [
        "lastNotNull"
      ],
      "fields": ""
    },
    "orientation": "auto",
    "textMode": "value_and_name",
    "colorMode": "background",
    "graphMode": "none",
    "justifyMode": "auto"
  },
  "targets": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "G7Htlqv4k"
      },
      "editorMode": "code",
      "expr": "ifOperStatus{job=\"$Job\", instance=~\"$instance\", ifName=~\"$interface\"}",
      "legendFormat": "__auto",
      "range": true,
      "refId": "A"
    }
  ]
}

Running open-source version 9.2.1

Thanks.

Same here, I struggle with the visual format for switch port up/down status. As I filter the displayed ports by “ifAlias” value “!=null” (only ports with alias are in use), I have a non uniform number of ports, i.e. 43 as of now.