[Bug?] Unwanted interpolated values in stacked graphs

Hi all,

for a scientific project of a charging station operator, I want to aggregate the current charging power of all charge poles.

The values are stored in an influx-DB and are the current meter value of each charge point. The values are stored every 15 minutes in the database.

The query is as following:
SELECT 4*DERIVATIVE(DISTINCT("value"),15m) FROM "meterValues" WHERE $timeFilter GROUP BY time(15m),evse fill(null)
where the “evse” is the name of the charge point, ‘value’ is the current meter value of the charge point.

Focussing on one specific value, the query inspector shows the result as expected:

...
"name": "meterValues",
            "tags": {
              "evse": "ZZ*XYZ*E2012*2"
            },
            "columns": [
              "time",
              "derivative"
            ],
            "values": [
              [
                1609279200000,
                45400
              ],
              [
                1609280100000,
                48272
              ],
              [
                1609337700000,
                334.125
              ],
              [
                1609338600000,
                44496
              ],
              [
                1609339500000,
                47260
              ]
            ]
...

There are two charging sessions recorded. One stops at 1609280100000 and the next starts at 1609337700000.

If I klick on this charge-point in the stacked graph, I see the correct presentation:


But if I show all datapoints, Grafana shows values even when there are no measurements of this datapoint at that specific timestamp:

(Additionally, there are ugly black areas at the bottom of each column)

I tried all variants of fill(), but it has no effect. As you see from the query result and the single-column presentation, the values themselves are obviously corrent, but in fails in the presentation.

Any hint from the community?

Thanks in advance :slight_smile:
(I use Grafana 7.3.5)

Hi all,

it is getting worse: to get a better overview and a reduced dataset, I filtered by chargepoints with a “DE” prefix in the Socket-identifier (“EVSE-ID”):

SELECT 4*non_negative_DERIVATIVE(DISTINCT("value"),15m) FROM "meterValues" WHERE "evse" =~ /DE/ and $timeFilter GROUP BY time(15m),evse

This results in a really strange representation:
Sorted direction:

And unsorted:


[1/2]

Taking a closer look to DEXXXE0011*2:


there is not even a measurement-point at the marked timestamp:

as you can also see at the JSON-Source:

      {
        "name": "meterValues",
        "tags": {
          "evse": "DE*XXX*E0011*2"
        },
        "columns": [
          "time",
          "non_negative_derivative"
        ],
        "values": [
          [
            1609169400000,
            1800.48
          ],
          [
            1609175700000,
            3692
          ],
          [
            1609230600000,
            64.91803278688525
          ]
        ]
      },

Any explanation for these strange behaviour?

(I upgraded to 7.3.6)
[2/2]

I am experiencing the same problems in my installation of grafana 7.3.6. However, I do not have any track record for previous versions, so I can’t say wether this is a recently introduced bug or the shortcomings of the stacking logic.