mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 09:33:34 -06:00
Histogram: ensure y axis is unit-less (#54667)
This commit is contained in:
parent
aa897e4f40
commit
8273839539
@ -220,7 +220,7 @@ export function buildHistogram(frames: DataFrame[], options?: HistogramTransform
|
||||
...field,
|
||||
config: {
|
||||
...field.config,
|
||||
unit: undefined,
|
||||
unit: field.config.unit === 'short' ? 'short' : undefined,
|
||||
},
|
||||
});
|
||||
if (!config && field.config.unit) {
|
||||
@ -371,6 +371,13 @@ export function histogramFieldsToFrame(info: HistogramFields, theme?: GrafanaThe
|
||||
info.bucketMin.display = display;
|
||||
info.bucketMax.display = display;
|
||||
}
|
||||
|
||||
// ensure updated units are reflected on the count field used for y axis formatting
|
||||
info.counts[0].display = getDisplayProcessor({
|
||||
field: info.counts[0],
|
||||
theme: theme ?? createTheme(),
|
||||
});
|
||||
|
||||
return {
|
||||
fields: [info.bucketMin, info.bucketMax, ...info.counts],
|
||||
length: info.bucketMin.values.length,
|
||||
|
Loading…
Reference in New Issue
Block a user