mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
Gauge: Fix display name showing for only single series (#26617)
This commit is contained in:
parent
cc0a8464ff
commit
ff6919173a
@ -21,7 +21,7 @@ export class BarGaugePanel extends PureComponent<PanelProps<BarGaugeOptions>> {
|
||||
valueProps: VizRepeaterRenderValueProps<FieldDisplay, DisplayValueAlignmentFactors>,
|
||||
menuProps: DataLinksContextMenuApi
|
||||
): JSX.Element => {
|
||||
const { options } = this.props;
|
||||
const { options, fieldConfig } = this.props;
|
||||
const { value, alignmentFactors, orientation, width, height, count } = valueProps;
|
||||
const { field, display, view, colIndex } = value;
|
||||
const { openMenu, targetClassName } = menuProps;
|
||||
@ -33,7 +33,7 @@ export class BarGaugePanel extends PureComponent<PanelProps<BarGaugeOptions>> {
|
||||
|
||||
return (
|
||||
<BarGauge
|
||||
value={clearNameForSingleSeries(count, field, display)}
|
||||
value={clearNameForSingleSeries(count, fieldConfig.defaults, display)}
|
||||
width={width}
|
||||
height={height}
|
||||
orientation={orientation}
|
||||
|
@ -12,14 +12,14 @@ export class GaugePanel extends PureComponent<PanelProps<GaugeOptions>> {
|
||||
valueProps: VizRepeaterRenderValueProps<FieldDisplay>,
|
||||
menuProps: DataLinksContextMenuApi
|
||||
): JSX.Element => {
|
||||
const { options } = this.props;
|
||||
const { options, fieldConfig } = this.props;
|
||||
const { width, height, count, value } = valueProps;
|
||||
const { field, display } = value;
|
||||
const { openMenu, targetClassName } = menuProps;
|
||||
|
||||
return (
|
||||
<Gauge
|
||||
value={clearNameForSingleSeries(count, field, display)}
|
||||
value={clearNameForSingleSeries(count, fieldConfig.defaults, display)}
|
||||
width={width}
|
||||
height={height}
|
||||
field={field}
|
||||
|
Loading…
Reference in New Issue
Block a user