@grafana/ui
Version:
Grafana Components Library
62 lines (61 loc) • 2.08 kB
TypeScript
import { type DisplayValueAlignmentFactors, type FieldDisplay, type TimeRange } from '@grafana/data';
import { type RadialShape, type RadialTextMode } from './types';
export interface RadialGaugeProps {
values: FieldDisplay[];
width: number;
height: number;
/**
* Circle or gauge (partial circle)
*/
shape?: RadialShape;
gradient?: boolean;
/**
* Bar width is always relative to size of the gauge.
* But this gives you control over the width relative to size.
* Range 0 - 1 (1 being the thickest)
* Defaults to 0.4
**/
barWidthFactor?: number;
glowBar?: boolean;
glowCenter?: boolean;
roundedBars?: boolean;
thresholdsBar?: boolean;
/**
* Specify if an endpoint marker should be shown at the end of the bar
*/
endpointMarker?: 'point' | 'glow';
/**
* Number of segments depends on size of gauge but this
* factor 1-10 gives you relative control
**/
segmentCount?: number;
/**
* Distance between segments
* Factor between 0-1
*/
segmentSpacing?: number;
/**
* If multiple is shown in a group (via VizRepeater).
* This impacts the auto textMode
*/
vizCount?: number;
/** Factors that should influence the positioning of the text */
alignmentFactors?: DisplayValueAlignmentFactors;
/** Explicit font size control */
valueManualFontSize?: number;
/** Explicit font size control */
nameManualFontSize?: number;
/** Specify which text should be visible */
textMode?: RadialTextMode;
showScaleLabels?: boolean;
/**
* If set, the gauge will use the neutral value instead of the min value as the starting point for a gauge.
* this is most useful when you need to show positive and negative values on a gauge.
*/
neutral?: number;
timeRange?: TimeRange;
}
/**
* https://developers.grafana.com/ui/latest/index.html?path=/docs/plugins-radialgauge--docs
*/
export declare function RadialGauge(props: RadialGaugeProps): import("react/jsx-runtime").JSX.Element;