Docs
📊 ⏐ Charts
Radial Gauge

Radial Gauge

A Radial Gauge in REAVIZ uses a radial scale to display a specific data point using a dial over a radial scale with defined limits. This type of gauge is ideal for showing how a value fits within a circular range.

Types supported by reaviz:

  • Single - Displays a single data point on a radial scale.
  • Stacked - Displays multiple data points stacked within the same radial gauge.

Where to use:

  • Display Single Values: Ideal for showing a specific value within a circular range.
  • Track Metrics: Useful for tracking performance metrics against a target.
  • Compare Multiple Values: Great for comparing multiple values within the same gauge.

Quick Start

To create a Radial Gauge, use import the RadialGauge and give it data. The chart will automatically configure itself with the default options exposed via props.

In this example, we only pass one data object, however, we can pass multiples and it will distribute the values across them.

Examples

Single

Stacked

API

RadialGauge (opens in a new tab)

PropDescriptionDefault
data *Data the chart will receive to render.
ChartDataShape[]
minValueMin value to scale on.
number | number[]
0
maxValueMax value to scale on.
number | number[]
100
startAngleStart angle for the first value.
number
0
endAngleEnd angle for the last value.
number
Math.PI * 2
seriesGauge series component to render.
ReactElement<RadialGaugeSeriesProps | StackedRadialGaugeSeriesProps, FC<Partial<RadialGaugeSeriesProps>> | FC<...>>
<RadialGaugeSeries />
idId of the chart.
string
widthWidth of the chart. If not provided will autosize.
number
heightHeight of the chart. If not provided will autosize.
number
marginsMargins for the chart.
Margins
classNameClassnames for the chart.
string
containerClassNameClassnames for the chart.
string
styleAdditional css styles.
StyleHTMLAttributes<SVGSVGElement>
centerCenter the chart. Used mainly internally.
boolean
centerXCenter chart on X Axis only. Used mainly internally.
boolean
centerYCenter chart on Y Axis only. Used mainly internally.
boolean

RadialGaugeSeries (opens in a new tab)

PropDescriptionDefault
idUnique id for the series.
string
dataData to render set by `RadialGauge` component.
ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>[]
scaleD3 scale function set by `RadialGauge` component.
any
startAngleStart angle set by `RadialGauge` component.
number
endAngleStart angle set by `RadialGauge` component.
number
arcWidthThe "thickness" of the arcs
number
5
widthWidth set by `RadialGauge` component.
number
heightHeight set by `RadialGauge` component.
number
paddingPadding between each gauge.
number
20
colorSchemeColor scheme to apply.
ColorSchemeType
['#00ECB1']
innerArcArc component.
ReactElement<RadialGaugeArcProps, FC<Partial<RadialGaugeArcProps>>>
<RadialGaugeArc />
outerArcOuter arc component. This is the 'fill' element.
ReactElement<RadialGaugeArcProps, FC<Partial<RadialGaugeArcProps>>>
<RadialGaugeOuterArc />
labelLabel component.
ReactElement<RadialGaugeLabelProps, FC<Partial<RadialGaugeLabelProps>>>
<RadialGaugeLabel />
valueLabelValue label component.
ReactElement<RadialGaugeValueLabelProps, FC<Partial<RadialGaugeValueLabelProps>>>
<RadialGaugeValueLabel />
minGaugeWidthMin width for a gauge. Only applicable in multi-series gauges.
number
50

StackedRadialGaugeSeries (opens in a new tab)

PropDescriptionDefault
dataData to render set by `RadialGauge` component.
ChartDataShape[]
scaleD3 scale function set by `RadialGauge` component.
any
startAngleStart angle set by `RadialGauge` component.
number
endAngleStart angle set by `RadialGauge` component.
number
widthWidth set by `RadialGauge` component.
number
heightHeight set by `RadialGauge` component.
number
colorSchemeColor scheme to apply.
ColorSchemeType
['#00ECB1']
innerArcArc component.
ReactElement<RadialGaugeArcProps, FC<Partial<RadialGaugeArcProps>>>
<RadialGaugeArc animated={true} />
stackedInnerArcStacked Arc component.
ReactElement<RadialGaugeStackedArcProps, FC<Partial<RadialGaugeStackedArcProps>>>
<RadialGaugeStackedArc animated={true} />
outerArcOuter arc component. This is the 'fill' element.
ReactElement<RadialGaugeArcProps, FC<Partial<RadialGaugeArcProps>>>
<RadialGaugeArc disabled={true} animated={false} />
labelLabel component.
ReactElement<StackedRadialGaugeValueLabelProps, FC<Partial<StackedRadialGaugeValueLabelProps>>>
<StackedRadialGaugeValueLabel />
descriptionLabelDescription label component.
ReactElement<StackedRadialGaugeDescriptionLabelProps, FC<Partial<StackedRadialGaugeDescriptionLabelProps>>>
fillFactorA factor from 0 to 1 determining how much of the Gauge should be filled with arcs
number
0.2
arcPaddingPadding between the stacked arcs, following d3 bandwidth innerPadding
number
0.15

RadialGaugeArc (opens in a new tab)

PropDescriptionDefault
idID generated by the chart.
string
dataData set by the `RadialGaugeSeries` components.
ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>
startAngleStart angle set by the `RadialGaugeSeries` components.
number
endAngleEnd angle set by the `RadialGaugeSeries` components.
number
innerRadiusInner radius set by the `RadialGaugeSeries` components.
number
outerRadiusOuter radius set by the `RadialGaugeSeries` components.
number
colorColor set by the `RadialGaugeSeries` components.
any
#353d44
cornerRadiusCorner Radius of the arcs, see https://github.com/d3/d3-shape#arc_cornerRadius
number
0
padAnglePad Angle between adjacent arcs, see https://github.com/d3/d3-shape#arc_padAngle
number
0
padRadiusPad Radius between adjacent arcs, see https://github.com/d3/d3-shape#arc_padRadius
number
0
animatedAnimation set by the `RadialGaugeSeries` component.
boolean
true
disabledDisable the interactions.
boolean
false
fillFill the arc.
string
gradientGradient shades for the bar.
ReactElement<GradientProps, FC<Partial<GradientProps>>>
tooltipTooltip component.
ReactElement<ChartTooltipProps, FC<Partial<ChartTooltipProps>>>
<ChartTooltip />
onClickEvent for when the arc is clicked.
(event: any) => void
onMouseEnterEvent for when the arc has mouse enter.
(event: any) => void
onMouseLeaveEvent for when the arc has mouse leave.
(event: any) => void

RadialGaugeLabel (opens in a new tab)

PropDescriptionDefault
dataData set by the `RadialGaugeSeries` component.
ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>
offsetOffset set by the `RadialGaugeSeries` component.
number
classNameClassname to apply to the label.
any
onClickLabel click event.
(event: { data: any; nativeEvent: any; }) => void
() => undefined

StackedRadialGaugeValueLabel (opens in a new tab)

PropDescriptionDefault
labelA label shown at the center
string
classNameA class name to apply
string
yOffsetA y offset to apply to the label
number
0

StackedRadialGaugeDescriptionLabel (opens in a new tab)

PropDescriptionDefault
labelA label shown at the center
string
classNameA class name to apply
string
yOffsetA y offset to apply to the label
number
0

RadialGaugeValueLabel (opens in a new tab)

PropDescriptionDefault
dataData set by the `RadialGaugeSeries` component.
ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>
classNameClassname to apply to the value label.
any