How to get stacked bar chart to show tooltip of current section on hover?

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

Grafana v8.3.4 (a551d74b11)

  • What are you trying to achieve?

I want to view the tooltip for a section of the bar chart

  • How are you trying to achieve it?

Hovering over the bar chart

  • What happened?

I am viewing a tool tip for another point at the same height (presumably this has a value of 0 so is occupying the same part of the bar chart).

As you can see in this screenshot, I want to see the tooltip/label for the yellow section of the bar chat. However, when I hover over, it shows me the tooltip for the blue label, which presumably is zero so appears at the same position.

How can I show the label of the part of the graph under the mouse, not a nearby point?

  • What did you expect to happen?

I would see the tool tip for the relevant section

  • Can you copy/paste the configuration(s) that you are having problems with?
{
  "fieldConfig": {
    "defaults": {
      "color": {
        "mode": "palette-classic"
      },
      "custom": {
        "axisLabel": "",
        "axisPlacement": "auto",
        "barAlignment": 0,
        "drawStyle": "bars",
        "fillOpacity": 100,
        "gradientMode": "none",
        "hideFrom": {
          "legend": false,
          "tooltip": false,
          "viz": false
        },
        "lineInterpolation": "linear",
        "lineWidth": 1,
        "pointSize": 5,
        "scaleDistribution": {
          "type": "linear"
        },
        "showPoints": "auto",
        "spanNulls": false,
        "stacking": {
          "group": "A",
          "mode": "normal"
        },
        "thresholdsStyle": {
          "mode": "off"
        }
      },
      "mappings": [],
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          },
          {
            "color": "red",
            "value": 80
          }
        ]
      }
    },
    "overrides": []
  },
  "gridPos": {
    "h": 12,
    "w": 8,
    "x": 8,
    "y": 0
  },
  "id": 4,
  "interval": "1d",
  "options": {
    "legend": {
      "calcs": [],
      "displayMode": "list",
      "placement": "bottom"
    },
    "tooltip": {
      "mode": "single"
    }
  },
  "targets": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "000000001"
      },
      "exemplar": true,
      "expr": "sum(increase(failed_mpoint_counter_total [1d])) by (id)",
      "interval": "1d",
      "legendFormat": "{{id}}",
      "refId": "A"
    }
  ],
  "title": "Failed MPoint Counter",
  "type": "timeseries"
}
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

N/A

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

N/A