MDK Logo
UI Kitreact-devkitComponentsFoundationWidgets

GaugeChartComponent

Single-needle gauge chart used inside container settings for thresholded percentage values. Displays a value as a gauge/speedometer chart with label and unit.

Single-needle gauge chart used inside container settings for thresholded percentage values.

Displays a value as a gauge/speedometer chart with label and unit.

import { GaugeChartComponent } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
maxRequirednumberMaximum value for the gauge
valueRequirednumberCurrent value
labelOptionalstring | undefinedLabel/title for the chart
unitRequiredstringUnit of measurement
chartStyleOptionalReact.CSSProperties | undefinedCustom chart style
colorsOptionalstring[] | undefinedArc colors in HEX format
hideTextOptionalboolean | undefinedHide the percentage text inside the chart
heightOptionalnumber | undefinedChart height in pixels
classNameOptionalstring | undefinedCustom className

Usage

Arc-gauge chart for displaying a single metric against its maximum range. Used in MicroBT container views for temperature and pressure readings.

Minimal example

import { GaugeChartComponent } from "@tetherto/mdk-react-devkit";

<GaugeChartComponent max={100} value={72} label="Temperature" unit="°C" />

Example

import { GaugeChartComponent } from '@tetherto/mdk-react-devkit'export const GaugeChartComponentExample = () => (  <div className="mdk-example-row">    <GaugeChartComponent max={100} value={72} label="Temperature" unit="°C" />    <GaugeChartComponent max={10} value={3.5} label="Pressure" unit="bar" />  </div>)