Dynamic titles not working

  • What Grafana version and what operating system are you using?
    –> 11.5.2

  • What are you trying to achieve?
    –> Use one of the query fields as the panel title

  • How are you trying to achieve it?
    –> Using the “map rows to fields“ transformation, and using the ${__field.label.<field_name>} on “panel title”

  • What happened?
    –> The title goes blank

  • What did you expect to happen?
    –> The field being used as the panel title

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

I need to create a dashboard to identify the top 10 sources of error in one of our processes, as part of which I need to create pie charts for those top 10.

The data is being fed to InfluxDB, and queried from Grafana to populate a table, and I’m creating pie charts by reusing that table.

The query table itself contains three labels and three values (e.g. number of “pass”,”fail”,”N/A” for each row), and contains hundreds of rows.

I’m using several transformations:

  1. “Sort by” percentage of failures
  2. “Limit” the results to the 10 worse
  3. “Add field from calculation” to add an index to each row
  4. “Filter data by values” to pick just one row of the table
  5. “Organize fields by name” to rename some fields to improve readability
  6. “Rows to fields” to determine how each remaining field is used

At this point creating the pie charts is working fine.
However, I need to be able to see the three labels on each pie chart to remedy the problem. For this, I’m trying to use one of the the field labels from the #6 transformation above on the “Panel title” field.

  • If I type a word under “Panel title”, the word is displayed as expected (e.g. “Package: “)
  • While typing the field name (e.g. ${__field. ), the text is displayed - as expected
  • The instant I complete the field name (e.g. Pkg: ${__field.label.lbl_code}, the title goes back to “Package:”, and no field label is added

Before I type the closing curly bracket, the panel title is displayed as: image

…but the instant I close the brackets, the dynamic part disappears: image

I checked the panel’s JSON code and AFAIK the field labels are defined correctly:

{
  "id": "rowsToFields",
  "options": {
    "mappings": [
      {
        "fieldName": "lbl_code",
        "handlerKey": "field.label"
      },
      {
        "fieldName": "lbl_src",
        "handlerKey": "field.label"
      },
      {
        "fieldName": "lbl_tgt",
        "handlerKey": "field.label"
      },
      {
        "fieldName": "failure",
        "handlerKey": "field.value"
      },
      {
        "fieldName": "unknown",
        "handlerKey": "field.value"
      },
      {
        "fieldName": "success",
        "handlerKey": "field.value"
      }
    ]
  }
}

What am I missing here?

Thanks!