Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Gauge class
Signature
export declare class Gauge extends PureComponent<Props>
Import
import { Gauge } from '@grafana/ui';
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
canvasElement | any | ||
defaultProps | static | Partial<Props> | |
renderVisualization | () => JSX.Element |
Methods
Method | Modifiers | Description |
---|---|---|
componentDidMount() | ||
componentDidUpdate() | ||
draw() | ||
getFontScale(length) | ||
getFormattedThresholds(decimals) | ||
render() |
canvasElement property
Signature
canvasElement: any;
defaultProps property
Signature
static defaultProps: Partial<Props>;
renderVisualization property
Signature
renderVisualization: () => JSX.Element;
componentDidMount method
Signature
componentDidMount(): void;
Returns:
void
componentDidUpdate method
Signature
componentDidUpdate(): void;
Returns:
void
draw method
Signature
draw(): void;
Returns:
void
getFontScale method
Signature
getFontScale(length: number): number;
Parameters
Parameter | Type | Description |
---|---|---|
length | number |
Returns:
number
getFormattedThresholds method
Signature
getFormattedThresholds(decimals: number): Threshold[];
Parameters
Parameter | Type | Description |
---|---|---|
decimals | number |
Returns:
Threshold[]
render method
Signature
render(): JSX.Element;
Returns:
JSX.Element