mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
BarGauge: First bar gauge panel option & some refactoring (#23128)
* First bar gauge panel option * Update doc comments * Minor changes * progress * Fixing typing errors * Minor type updates * Fix that TS! * Bring satisfaction to that beast called typescript Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
@@ -6,7 +6,14 @@ import { config } from 'app/core/config';
|
||||
|
||||
// Types
|
||||
import { StatPanelOptions } from './types';
|
||||
import { VizRepeater, BigValue, DataLinksContextMenu, BigValueSparkline, BigValueGraphMode } from '@grafana/ui';
|
||||
import {
|
||||
VizRepeater,
|
||||
VizRepeaterRenderValueProps,
|
||||
BigValue,
|
||||
DataLinksContextMenu,
|
||||
BigValueSparkline,
|
||||
BigValueGraphMode,
|
||||
} from '@grafana/ui';
|
||||
|
||||
import {
|
||||
PanelProps,
|
||||
@@ -21,13 +28,9 @@ import {
|
||||
import { getFieldLinksSupplier } from 'app/features/panel/panellinks/linkSuppliers';
|
||||
|
||||
export class StatPanel extends PureComponent<PanelProps<StatPanelOptions>> {
|
||||
renderValue = (
|
||||
value: FieldDisplay,
|
||||
width: number,
|
||||
height: number,
|
||||
alignmentFactors: DisplayValueAlignmentFactors
|
||||
): JSX.Element => {
|
||||
renderValue = (valueProps: VizRepeaterRenderValueProps<FieldDisplay, DisplayValueAlignmentFactors>): JSX.Element => {
|
||||
const { timeRange, options } = this.props;
|
||||
const { value, alignmentFactors, width, height } = valueProps;
|
||||
let sparkline: BigValueSparkline | undefined;
|
||||
|
||||
if (value.sparkline) {
|
||||
|
||||
Reference in New Issue
Block a user