Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StateTimeline: Fix negative infinity legend/tooltip from thresholds #60279

Merged
merged 3 commits into from Dec 14, 2022

Conversation

leeoniya
Copy link
Contributor

state-timeline-neg-inf-legend.json
{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 548,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "testdata",
        "uid": "PD8C576611E62080A"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "fillOpacity": 70,
            "lineWidth": 0,
            "spanNulls": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 11,
        "w": 8,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "options": {
        "alignValue": "left",
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "mergeValues": true,
        "rowHeight": 0.9,
        "showValue": "auto",
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "csvContent": "time,value\n2022-12-09T15:20:49Z,1\n2022-12-09T16:32:49Z,20\n2022-12-09T17:44:49Z,90\n2022-12-09T18:56:49Z,30\n2022-12-09T20:08:49Z,5\n2022-12-09T21:20:49Z,0",
          "datasource": {
            "type": "testdata",
            "uid": "PD8C576611E62080A"
          },
          "refId": "A",
          "scenarioId": "csv_content"
        }
      ],
      "title": "Panel Title",
      "type": "state-timeline"
    }
  ],
  "refresh": false,
  "schemaVersion": 37,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "2022-12-09T15:20:49.000Z",
    "to": "2022-12-09T21:20:49.000Z"
  },
  "timepicker": {},
  "timezone": "",
  "title": "state-timeline-neg-inf-legend",
  "uid": "UG6QWd5Vk",
  "version": 2,
  "weekStart": ""
}

before:

image

after:

image

@leeoniya leeoniya enabled auto-merge (squash) December 14, 2022 05:55
@leeoniya leeoniya merged commit e0eacf1 into main Dec 14, 2022
@leeoniya leeoniya deleted the leeoniya/state-timeline-neg-inf-legend branch December 14, 2022 05:57
grafanabot pushed a commit that referenced this pull request Dec 14, 2022
leeoniya added a commit that referenced this pull request Dec 14, 2022
…esholds (#60280)

StateTimeline: Fix negative infinity legend/tooltip from thresholds (#60279)

(cherry picked from commit e0eacf1)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
GuYounes pushed a commit to paul-wurth/BIXpert that referenced this pull request Feb 8, 2023
…esholds (grafana#60280)

StateTimeline: Fix negative infinity legend/tooltip from thresholds (grafana#60279)

(cherry picked from commit e0eacf1)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants