Commit ff691917 by Torkel Ödegaard Committed by GitHub

Gauge: Fix display name showing for only single series (#26617)

parent cc0a8464
......@@ -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}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment