diff --git a/packages/grafana-ui/src/components/BigValue/BigValue.tsx b/packages/grafana-ui/src/components/BigValue/BigValue.tsx index 7eca4c7b9857..c677484b79ad 100644 --- a/packages/grafana-ui/src/components/BigValue/BigValue.tsx +++ b/packages/grafana-ui/src/components/BigValue/BigValue.tsx @@ -1,9 +1,11 @@ +import { cx } from '@emotion/css'; import React, { PureComponent } from 'react'; import { DisplayValue, DisplayValueAlignmentFactors, FieldSparkline, VizOrientation } from '@grafana/data'; import { VizTextDisplayOptions } from '@grafana/schema'; import { Themeable2 } from '../../types'; +import { clearButtonStyles } from '../Button'; import { FormattedValueDisplay } from '../FormattedValueDisplay/FormattedValueDisplay'; import { buildLayout } from './BigValueLayout'; @@ -79,7 +81,7 @@ export class BigValue extends PureComponent { }; render() { - const { onClick, className, hasLinks } = this.props; + const { onClick, className, hasLinks, theme } = this.props; const layout = buildLayout(this.props); const panelStyles = layout.getPanelStyles(); const valueAndTitleContainerStyles = layout.getValueAndTitleContainerStyles(); @@ -90,14 +92,32 @@ export class BigValue extends PureComponent { // When there is an outer data link this tooltip will override the outer native tooltip const tooltip = hasLinks ? undefined : textValues.tooltip; + if (!onClick) { + return ( +
+
+ {textValues.title &&
{textValues.title}
} + +
+ {layout.renderChart()} +
+ ); + } + return ( -
+
+ ); } }