Grafana Dashboard Zoom out button not working properly

Hello ,

Grafana version - 7.5.5
Loki version - 2.2.1
Google Chrome version - 92.0.4515.107

we have created a dashboard using loki data source. This is working properly in relative time period. But when we click on the zoom out button in the dashboard 2 or 3 time grafana dashboard is not loading properly in bar and pie char visualization.
in the bar types are overlapping and pie chart will disappear.

Hi @parulgupta

Can you please share you raw dashboard JSON?

{
  "datasource": null,
  "fieldConfig": {
    "defaults": {
      "color": {
        "mode": "palette-classic"
      },
      "mappings": [],
      "thresholds": {
        "mode": "absolute",
        "steps": [
          {
            "color": "green",
            "value": null
          },
          {
            "color": "red",
            "value": 80
          }
        ]
      }
    },
    "overrides": [
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"504\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "super-light-blue",
              "mode": "fixed"
            }
          }
        ]
      },
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"503\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "super-light-red",
              "mode": "fixed"
            }
          }
        ]
      },
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"502\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "light-yellow",
              "mode": "fixed"
            }
          }
        ]
      },
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"200\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "super-light-green",
              "mode": "fixed"
            }
          }
        ]
      },
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"301\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "super-light-purple",
              "mode": "fixed"
            }
          }
        ]
      },
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"304\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "super-light-red",
              "mode": "fixed"
            }
          }
        ]
      },
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"500\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "light-green",
              "mode": "fixed"
            }
          }
        ]
      },
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"302\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "super-light-yellow",
              "mode": "fixed"
            }
          }
        ]
      },
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"206\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "super-light-purple",
              "mode": "fixed"
            }
          }
        ]
      },
      {
        "matcher": {
          "id": "byName",
          "options": "{Status_code=\"404\"}"
        },
        "properties": [
          {
            "id": "color",
            "value": {
              "fixedColor": "rgb(255, 166, 193)",
              "mode": "fixed"
            }
          }
        ]
      }
    ]
  },
  "gridPos": {
    "h": 6,
    "w": 24,
    "x": 0,
    "y": 26
  },
  "id": 2,
  "options": {
    "displayLabels": [],
    "legend": {
      "displayMode": "table",
      "placement": "right",
      "values": [
        "value"
      ]
    },
    "pieType": "pie",
    "reduceOptions": {
      "calcs": [
        "last"
      ],
      "fields": "",
      "values": false
    },
    "text": {}
  },
  "pluginVersion": "7.5.5",
  "targets": [
    {
      "expr": "sum(count_over_time({job=\"kube-system/nginx-ingress-controller\"} | regexp `(?P<IP>\\S+) (- - )\\[(?P<Timestamp>[\\w:\\/]+\\s[+\\\\-]\\d{4})\\] \"(?P<Method>\\S+)\\s?(?P<Path>\\S+)?\\s?(?P<Protocol>\\S+)?\" (?P<Status_code>\\d{3}) (?P<Request_size>\\d+)`| Status_code != \"\" [$interval]))  by (Status_code)",
      "refId": "A"
    },
    {
      "expr": "sum(count_over_time({job=\"kube-system/nginx-ingress-controller\"} | regexp `(?P<IP>\\S+) (- - )\\[(?P<Timestamp>[\\w:\\/]+\\s[+\\\\-]\\d{4})\\] \"(?P<Method>\\S+)\\s?(?P<Path>\\S+)?\\s?(?P<Protocol>\\S+)?\" (?P<Status_code>\\d{3}) (?P<Request_size>\\d+)`| Status_code = \"\" [5m]))  by (Status_code)",
      "hide": true,
      "legendFormat": "{Unknown}",
      "refId": "B"
    }
  ],
  "timeFrom": null,
  "timeShift": null,
  "title": "Status Code Count",
  "type": "piechart"
},

that JSON isn’t working for me…

Hi mattabrams,

Thanks for the response.
I think the whole json file is not posted.
So i am posted the files in multiple batches.
could you please collect all the batched in one file and then try.
We have some limitation in project so can’t share the git link.

Regards
Parul

{
“annotations”: {
“list”: [
{
“builtIn”: 1,
“datasource”: “-- Grafana --”,
“enable”: true,
“hide”: true,
“iconColor”: “rgba(0, 211, 255, 1)”,
“name”: “Annotations & Alerts”,
“type”: “dashboard”
}
]
},
“editable”: true,
“gnetId”: null,
“graphTooltip”: 0,
“id”: 2,
“iteration”: 1629968791380,
“links”: ,
“panels”: [
{
“collapsed”: false,
“datasource”: null,
“gridPos”: {
“h”: 1,
“w”: 24,
“x”: 0,
“y”: 0
},
“id”: 11,
“panels”: ,
“title”: “Dashboard metrics”,
“type”: “row”
},
{
“datasource”: null,
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: ,
“min”: 0,
“noValue”: “-”,
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
}
]
}
},
“overrides”:
},
“gridPos”: {
“h”: 8,
“w”: 12,
“x”: 0,
“y”: 1
},
“id”: 6,
“options”: {
“displayMode”: “gradient”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“last”
],
“fields”: “”,
“values”: false
},
“showUnfilled”: true,
“text”: {}
},
“pluginVersion”: “7.5.5”,
“targets”: [
{
“expr”: "sum(count_over_time({job=“kube-system/nginx-ingress-controller”} | regexp (?P<IP>\\S+) (?P<identd>\\S+) (?P<user>\\S+) \\[(?P<Timestamp>[\\w:\\/]+\\s[+\\\\-]\\d{4})\\] \"(?P<Method>\\S+)\\s?(?P<Path>\\S+)?\\s?(?P<Protocol>\\S+)?\" (?P<Status_code>\\d{3}) (?P<Bytes_sent>\\d+|-)\\s?\"?(?P<referer>[^\\\"]*)\"?\\s?\"?(?P<user_agent>[^\\\"]*)?\"? (?P<req_length>\\d+) (?P<req_time>0\\.(8[0]{1,2}|[0-7][\\d\\d]{1,2})) \\[(?P<up_name>\\S+)\\] (\\[\\]) (?P<up_addr>\\S+) (?P<up_res_len>\\d+) (?P<up_res_time>0\\.(8[0]{1,2}|[0-7][\\d\\d]{1,2})) (?P<up_status>\\d{3})|up_name != “” [$interval])) by (up_name) ",
“legendFormat”: “{{up_name}}”,
“refId”: “A”
}
],
“title”: “Access count per proxy upstream name”,
“type”: “bargauge”
},
{
“datasource”: null,
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “thresholds”
},
“mappings”: ,
“min”: 0,
“noValue”: “-”,
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
}
]
}
},
“overrides”:
},
“gridPos”: {
“h”: 8,
“w”: 12,
“x”: 12,
“y”: 1
},
“id”: 8,
“options”: {
“displayMode”: “gradient”,
“orientation”: “horizontal”,
“reduceOptions”: {
“calcs”: [
“last”
],
“fields”: “”,
“values”: false
},
“showUnfilled”: true,
“text”: {}
},
“pluginVersion”: “7.5.5”,
“targets”: [
{
“expr”: "sum(count_over_time({job=“kube-system/nginx-ingress-controller”} | regexp (?P<IP>\\S+) (?P<identd>\\S+) (?P<user>\\S+) \\[(?P<Timestamp>[\\w:\\/]+\\s[+\\\\-]\\d{4})\\] \"(?P<Method>\\S+)\\s?(?P<Path>\\S+)?\\s?(?P<Protocol>\\S+)?\" (?P<Status_code>\\d{3}) (?P<Bytes_sent>\\d+|-)\\s?\"?(?P<referer>[^\\\"]*)\"?\\s?\"?(?P<user_agent>[^\\\"]*)?\"? (?P<req_length>\\d+) (?P<req_time>0\\.(8[0]{1,2}|[0-7][\\d\\d]{1,2})) \\[(?P<up_name>\\S+)\\] (\\[\\]) (?P<up_addr>\\S+) (?P<up_res_len>\\d+) (?P<up_res_time>0\\.(8[0]{1,2}|[0-7][\\d\\d]{1,2})) (?P<up_status>\\d{3})| IP != “”[$interval])) by (IP) ",
“legendFormat”: “{{IP}}”,
“refId”: “A”
}
],
“title”: "Unique remote IP count ",
“type”: “bargauge”
},
{
“datasource”: null,
“fieldConfig”: {
“defaults”: {
“color”: {
“mode”: “palette-classic”
},
“mappings”: ,
“min”: 0,
“noValue”: “-”,
“thresholds”: {
“mode”: “absolute”,
“steps”: [
{
“color”: “green”,
“value”: null
},
{
“color”: “red”,
“value”: 80
}
]
}
},
“overrides”: [
{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“504”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “super-light-blue”,
“mode”: “fixed”
}
}
]
},
{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“503”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “super-light-red”,
“mode”: “fixed”
}
}
]
},
{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“502”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “light-yellow”,
“mode”: “fixed”
}
}
]
},
{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“200”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “super-light-green”,
“mode”: “fixed”
}
}
]
},

{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“301”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “super-light-purple”,
“mode”: “fixed”
}
}
]
},
{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“304”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “super-light-red”,
“mode”: “fixed”
}
}
]
},
{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“500”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “light-green”,
“mode”: “fixed”
}
}
]
},
{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“302”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “super-light-yellow”,
“mode”: “fixed”
}
}
]
},
{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“206”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “super-light-purple”,
“mode”: “fixed”
}
}
]
},
{
“matcher”: {
“id”: “byName”,
“options”: “{Status_code=“404”}”
},
“properties”: [
{
“id”: “color”,
“value”: {
“fixedColor”: “rgb(255, 166, 193)”,
“mode”: “fixed”
}
}
]
}
]
},
“gridPos”: {
“h”: 6,
“w”: 24,
“x”: 0,
“y”: 9
},
“id”: 2,
“options”: {
“displayLabels”: ,
“legend”: {
“displayMode”: “table”,
“placement”: “right”,
“values”: [
“value”
]
},
“pieType”: “pie”,
“reduceOptions”: {
“calcs”: [
“last”
],
“fields”: “”,
“values”: false
},
“text”: {}
},
“pluginVersion”: “7.5.5”,
“targets”: [
{
“expr”: “sum(count_over_time({job=“kube-system/nginx-ingress-controller”} | regexp (?P<IP>\\S+) (- - )\\[(?P<Timestamp>[\\w:\\/]+\\s[+\\\\-]\\d{4})\\] \"(?P<Method>\\S+)\\s?(?P<Path>\\S+)?\\s?(?P<Protocol>\\S+)?\" (?P<Status_code>\\d{3}) (?P<Request_size>\\d+)| Status_code != “” [$interval])) by (Status_code)”,
“legendFormat”: “{{Status_code}}”,
“refId”: “A”
}
],
“timeFrom”: null,
“timeShift”: null,
“title”: “Status Code Count”,
“type”: “piechart”
}
],
“refresh”: false,
“schemaVersion”: 27,
“style”: “dark”,
“tags”: ,
“templating”: {
“list”: [
{
“auto”: true,
“auto_count”: 1,
“auto_min”: “10s”,
“current”: {
“selected”: false,
“text”: “auto”,
“value”: “$__auto_interval_interval”
},
“description”: null,
“error”: null,
“hide”: 0,
“label”: null,
“name”: “interval”,
“options”: [
{
“selected”: true,
“text”: “auto”,
“value”: “$__auto_interval_interval”
},
{
“selected”: false,
“text”: “1m”,
“value”: “1m”
},
{
“selected”: false,
“text”: “10m”,
“value”: “10m”
},
{
“selected”: false,
“text”: “30m”,
“value”: “30m”
},
{
“selected”: false,
“text”: “1h”,
“value”: “1h”
},
{
“selected”: false,
“text”: “6h”,
“value”: “6h”
},
{
“selected”: false,
“text”: “12h”,
“value”: “12h”
},
{
“selected”: false,
“text”: “1d”,
“value”: “1d”
},
{
“selected”: false,
“text”: “2d”,
“value”: “2d”
},
{
“selected”: false,
“text”: “3d”,
“value”: “3d”
},
{
“selected”: false,
“text”: “7d”,
“value”: “7d”
},
{
“selected”: false,
“text”: “14d”,
“value”: “14d”
},
{
“selected”: false,
“text”: “30d”,
“value”: “30d”
}
],
“query”: “1m,10m,30m,1h,6h,12h,1d,2d,3d,7d,14d,30d”,
“queryValue”: “”,
“refresh”: 2,
“skipUrlSync”: false,
“type”: “interval”
}
]
},
“time”: {
“from”: “now-5m”,
“to”: “now”
},
“timepicker”: {},
“timezone”: “”,
“title”: “Nginx Ingress controller-zoom-out”,
“uid”: “y2NP1Zk7z”,
“version”: 33
}

And please if you get some time.
I have raised one more bug please also check that
https://localhost:3000/t/relative-time-interval-is-not-working-for-2d/51286