We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ff9717 commit ad4f9a6Copy full SHA for ad4f9a6
observability-lib/grafana/panels.go
@@ -55,7 +55,7 @@ type LegendOptions struct {
55
Placement common.LegendPlacement
56
DisplayMode common.LegendDisplayMode
57
Calcs []string
58
- SortBy string // Sort legend by this field (e.g., "last", "max", "mean")
+ SortBy string // Sort legend by this field (e.g., "Last *", "Max", "Mean")
59
SortDesc bool // Sort in descending order
60
}
61
@@ -81,7 +81,9 @@ func newLegend(options *LegendOptions) *common.VizLegendOptionsBuilder {
81
82
if options.SortBy != "" {
83
builder.SortBy(options.SortBy)
84
- builder.SortDesc(options.SortDesc)
+ if options.SortDesc {
85
+ builder.SortDesc(true)
86
+ }
87
88
89
return builder
0 commit comments