Mouse over broken after moving to backend plugin

After rewriting my plugin as an backend plugin, mouse hoovering the graph will either show the last or the first entry, but never all the middle points. If i enable “Points” under display, so it is easier to see if what the mouse is over, I can see that if I move mouse mouse to the left half, it show the value from the far right,
if I move my mouse the right half, it show the value from the far left.

I never really understod the “data.NewFrame” part in the go code, so i trie creating a frame per point instead of a frame per dataset, that “kind of” works except now grafana cant figure out to correlate each target

Can anyone “spot” the error ? Am i creating the data frames wrongly or is grafana 7.4 broken when using backend plugins ? ( I create a graph using Prometheus or my old add it works perfectly fine so must be either a “backend plugin” thing or “my code” thing, most likely something my code . )

Found it, if i order the data in reverse order, the mouse over starts working again.

Thanks for sharing you findings! Grafana doesn’t sort query responses, it’s up to each data sources to make sure that the results are sorted.

1 Like