Lines being drawn between unadjacent points in graphs

  • What Grafana version and what operating system are you using?
    AWS Managed Grafana, v8.2.5

  • What are you trying to achieve?
    I would like to use the time series panel feature to connect data points with lines.

  • How are you trying to achieve it?
    By using the setting under “Graph Styles”.

  • What happened?
    There appear to be some issues where extra lines are drawn between data points that are not adjacent to each-other. Attached you can find a graph with the “Lines” option enabled and disabled:

  • What did you expect to happen?
    I expected there not to be these extra lines

  • Can you copy/paste the configuration(s) that you are having problems with?
    Relevant Panel JSON model:

  "fieldConfig": {
    "defaults": {
      "custom": {
        "drawStyle": "line",
        "lineInterpolation": "smooth",
        "barAlignment": 0,
        "lineWidth": 1,
        "fillOpacity": 3,
        "gradientMode": "none",
        "spanNulls": false,
        "showPoints": "always",
        "pointSize": 3,
        "stacking": {
          "mode": "none",
          "group": "A"
        "axisPlacement": "left",
        "axisLabel": "",
        "scaleDistribution": {
          "type": "linear"
        "hideFrom": {
          "tooltip": false,
          "viz": false,
          "legend": false
        "thresholdsStyle": {
          "mode": "off"
        "lineStyle": {
          "fill": "solid"
        "axisGridShow": true
      "color": {
        "mode": "palette-classic"
      "thresholds": {
        "mode": "absolute",
        "steps": [
            "value": null,
            "color": "green"
            "value": 80,
            "color": "red"
      "mappings": [],
      "max": 10
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No errors in the Grafana UI

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


The order in which points are connected by lines depends on the ordering of the points in the table returned by the query. Adding an “ORDER BY time” to my query solved this.

Thank you to agnestoulet1 from this thread

1 Like