-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Need clarification on Long/Wide Formats #880
Comments
@josmperez please have a look and unassign if you are unable to fix this one. Thanks! |
Thanks for pointing this out. I'll take a look. |
Need engineer tech review (@andresmgot ?) of this suggested fix. |
I agree that the sentence is a bit confusing, maybe @marefr can correct me if I am wrong but it could clarify:
tsSchema := frame.TimeSeriesSchema()
if tsSchema.Type == data.TimeSeriesTypeLong {
wideFrame, err := data.LongToWide(frame, nil)
if err == nil {
// handle error
}
// return wideFrame
}
I don't think this happens but I am no expert of the timeseries visualization so maybe it's the case.
I was not aware of this either. |
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?
The text was updated successfully, but these errors were encountered: