Plotted data disappears after refreshing

Hi everyone,
I am still pretty new to Grafana, so sorry if I am missing something very obvious.
I want to build a monitoring page for a physics experiment. The data is stored in ROOT files (a particle physics software developed by CERN), so I wrote my own datasource plugin to read these files and return a dataframe with the information I need.

I can get the data to be plotted, but when I hit “refresh”, the line disappears from the plot. If I trigger a redraw by changing things like the line style or tiggling grid lines on or off in the panel edit menu, it comes back. This happens with timesiers, X-Y plots and Geomap (the data is GPS coordinates) visualizations, so I am pretty sure this has something to do with the data itself, not the visualization.

Another weird thing happens with the “Query Inspector”. If I look at the “Data” panel, it just says “No Data”, but when I download the data as a CSV, the data shows up.

It also is displayed in the JSON panel. The Dataframe JSON looks like this:

 {
    "schema": {
      "refId": "A",
      "meta": {
        "type": "timeseries-wide",
        "executedQueryString": "test"
      },
      "fields": [
        {
          "name": "Time",
          "type": "time",
          "typeInfo": {
            "frame": "time.Time"
          },
          "config": {}
        },
        {
          "name": "lon",
          "type": "number",
          "typeInfo": {
            "frame": "float64"
          },
          "config": {}
        },
        {
          "name": "lat",
          "type": "number",
          "typeInfo": {
            "frame": "float64"
          },
          "config": {}
        },
        {
          "name": "alt",
          "type": "number",
          "typeInfo": {
            "frame": "float64"
          },
          "config": {}
        }
      ]
    },
    "data": {
      "values": [
        [
          1480735603000,
          ....
        ],
        [
          147.623046875,
          ....
        ],
        [
          -79.08599090576172,
          ...
        ],
        [
          39767.26953125,
         ....
        ]
      ]
    }
  }
]

I inserted … for the data values, but each field only has about 100 entries, so data size should not be a problem.
I am suspecting that there is something wrong with this dataframe, but I can’t figure out what. Does anyone have an idea?