mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 08:56:43 -06:00
Histogram: Fix field displayName cache (#94685)
This commit is contained in:
parent
221e640264
commit
125b7c2fd8
@ -1,6 +1,6 @@
|
||||
import { useMemo } from 'react';
|
||||
|
||||
import { PanelProps, buildHistogram, getHistogramFields } from '@grafana/data';
|
||||
import { PanelProps, buildHistogram, cacheFieldDisplayNames, getHistogramFields } from '@grafana/data';
|
||||
import { histogramFieldsToFrame } from '@grafana/data/src/transformations/transformers/histogram';
|
||||
import { TooltipDisplayMode, TooltipPlugin2, useTheme2 } from '@grafana/ui';
|
||||
import { TooltipHoverMode } from '@grafana/ui/src/components/uPlot/plugins/TooltipPlugin2';
|
||||
@ -32,6 +32,8 @@ export const HistogramPanel = ({ data, options, width, height }: Props) => {
|
||||
});
|
||||
});
|
||||
|
||||
cacheFieldDisplayNames(data.series);
|
||||
|
||||
if (data.series.length === 1) {
|
||||
const info = getHistogramFields(data.series[0]);
|
||||
if (info) {
|
||||
|
Loading…
Reference in New Issue
Block a user