mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 00:37:04 -06:00
datatrails: on histogram breakdowns, show label value in legend (#88154)
fix: on histogram breakdowns, show label value in legend
This commit is contained in:
parent
b5cf90ce78
commit
a7d304a871
@ -68,9 +68,16 @@ function heatMapQuery(groupings: string[] = []): PromQuery {
|
||||
function percentileQuery(percentile: number, groupings: string[] = []) {
|
||||
const percent = percentile / 100;
|
||||
|
||||
let legendFormat = `${percentile}th Percentile`;
|
||||
|
||||
// For the breakdown view, show the label value variable we are grouping by
|
||||
if (groupings[0]) {
|
||||
legendFormat = `{{${groupings[0]}}}`;
|
||||
}
|
||||
|
||||
return {
|
||||
refId: `Percentile${percentile}`,
|
||||
expr: `histogram_quantile(${percent}, ${baseQuery(groupings)})`,
|
||||
legendFormat: `${percentile}th Percentile`,
|
||||
legendFormat,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user