grafana / plugin-tools

Create Grafana plugins with ease.
https://grafana.com/developers/plugin-tools/
Apache License 2.0
55 stars 27 forks source link

Feat: Docs clarification on Long/Wide Formats #880

Open sarahzinger opened 3 months ago

sarahzinger commented 3 months ago

Which areas does this feature request relate to

Problem

I'm working on a datasource and reading through the long vs wide data frame section and find myself a bit confused by this line:

"Grafana can detect and convert data frames in long format into wide format."

This doesn't happen automatically right? My understanding is that grafana offers some helper functions to make this easier, perhaps we could add docs for that? Or does the timeseries visualization always convert dataframes to wide?

I think it'd also be good to mention here that if developers want to their dataframes to support alerting they need to use wide dataframes

Solution

Maybe link to the wideToLong and longToWide functions? https://github.com/grafana/grafana-plugin-sdk-go/blob/main/data/time_series.go#L210

Alternatives

No response

Additional context

No response

Are you interested in contributing the solution?

derek-cadzow commented 2 months ago

@josmperez please have a look and unassign if you are unable to fix this one. Thanks!

josmperez commented 2 months ago

Thanks for pointing this out. I'll take a look.