Why are the Pie Chart values different to the Table View values when I change the resolution?

Jordan Layton 0 Reputation points Microsoft Employee
2025-05-21T16:36:44.1233333+00:00

Grafana Version: v10.4.17+security-01

When I change the Resolution on my pie chart, it changes the totals for my segments. For example, a resolution of 2m creates the below graph (with Passed = 1337, Skipped = 50, Failed = 36):

User's image

but a resolution of 1m creates the below graph:

User's image

When investigating this discrepancy, I realised that if I was looking at the Table View, and ran the query with Resolution at 1m, then switched to the Pie Chart, it would show the values of resolution at 2m (Passed = 1337, Skipped = 50 and Failed = 36). If I ran the query again, in the Pie Chart view, this would change back to the 1m view (Passed = 800 etc).

This means that the table view of the pie chart is different to the pie chart itself. Can anyone help me explain this?

I am using a Geneva Datasource, with the service set to Metrics. I have a pie chart that aggregates on every dimension of the metric except status, which can be passed, failed or skipped.User's image

My sampling type is Count, I have Show Top set to 5000 by Sum and no Zoom aggregation function.

I see the same behaviour regardless of whether I have Value Options set to Calculate Total:User's image

or Value Options set to All Values, with a 5000 limit, and a Reduce Transformation for Series to Rows and Total

User's imageUser's image

In this example, there is a significant different in values between 1m and 2m, in other setups I have observed this only at resolution of 1m-4m. Usually, all the other resolutions match, so 5m and 12h yield the same pie chart.

I have been able to reproduce in various filtering of my metric, but cannot provide steps to reproduce more generically. Each metric emits a value of 1, so Sampling Type Count or Sum would work (and be equal). Since the metric may be emitted many time in the same minute, Total is the correct Calculation. The underlying metric is a time series, I have tried the transformation 'Prepare Time Series' but that had no impact.

This is an issue as we cannot have confidence in the data shown in the visualisations, any help would be greatly appreciated.

Can someone explain why this discrepancy occurs and how to ensure accurate visualization?

Azure Managed Grafana
Azure Managed Grafana
An Azure service used to deploy Grafana dashboards for analytics and monitoring solutions.
134 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Vinod Pittala 3,695 Reputation points Microsoft External Staff Moderator
    2025-05-22T00:19:31.8833333+00:00

    Hello Jordan Layton,

    The discrepancy you're experiencing between the pie chart values and the table view values when changing the resolution in Grafana can be attributed to how data aggregation works at different resolutions.

    When you change the resolution (1m vs 2m), Grafana and the Geneva Datasource group time-series data into those respective intervals. Here's a breakdown to help clarify what's happening:

    1. Sampling vs. Downsampling (Time Resolution):

    Sampling: Collecting data at a fixed time interval.

    Example: Getting a metric value every 1 minute.

    Down-sampling: Aggregating finer-grained data into coarser intervals.

    Example: Taking multiple 1-minute samples and averaging them into a single 2-minute value.

    Impact of Different Resolutions:

    ResolutionWhat HappensProsConsResolutionWhat HappensProsCons1mYou collect or view data every minuteFine-grained detailCan show incomplete data if emissions are delayed or sparse2mData is aggregated into 2-minute chunksSmooths data, better for summariesMight hide short spikes or rapid changes 

    2. Grafana Pie Charts – How Aggregation Works

      - Pie charts in Grafana don't show time series over time — they show totals per group (label).

    How Grafana Calculates Pie Chart Values:

    • Group time series by label (e.g., HTTP status: 200, 404, etc.).
    • Reduce each time series (per label) into a single number, using:

                Total (sum) – most common

                Mean – average

                Max – peak value

    3. Display as a pie slice per label.

    The pie chart’s accuracy depends heavily on the data available in the time window.  

    i) If your resolution is too fine (1m), some labels might appear smaller or missing due to delayed metric arrival. Be over-fragmented (e.g., multiple tiny time series instead of one clean series).

    ii) If your resolution is coarser (2m, 5m), More data fits into each bucket and aggregation (sum or mean) is more stable and reliable.

    --Example Scenario: HTTP Status Code Counts

    Imagine you're counting HTTP responses (status codes):  

    • At 1m resolution: In minute 1: 10 200, 2 500
    • In minute 2: Only 5 200, because some were delayed.

    Grafana may show fewer 200s or multiple fragments.

    • At 2m resolution: Minute 1–2: 15 200, 2 500 (more complete picture)

    Pie chart will more accurately show traffic distribution by status.

    Hence, 1m resolution = high detail, but more risk of fragmentation or incomplete buckets

    2m+ resolution = less detail, but more accurate aggregations in pie charts

    Pie charts rely on reduced metrics per label, and the input data quality (sampling + timing) matter a lot3. Display as a pie slice per label.


    If the provided solution works for your query, please do not forget to Upvote it. this can be beneficial to other community members.it would be greatly appreciated and helpful to others.

    Thanks

    0 comments No comments

  2. Jordan Layton 0 Reputation points Microsoft Employee
    2025-05-22T15:48:59.7+00:00

    I solved this by setting the Max Data Points in Query Options to be a very large number, so that values weren't being dropped. The discrepency between the Pie Chart view and the Table View was because, without a large number for Max Data Points, the interval between time series was set to 2m. It looks like the Table View ignores this Max Data Points, and that's why I was getting the correct numbers for Table View and not Pie Chart. Now, both views match.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.