Skip to Content

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Β 

NameTypeDefault
dataChartDataShape[]

Data the chart will receive to render.

minValuenumber | number[]

Min value to scale on.

0
maxValuenumber | number[]

Max value to scale on.

100
startAnglenumber

Start angle for the first value.

0
endAnglenumber

End angle for the last value.

Math.PI * 2
seriesReactElement<RadialGaugeSeriesProps | StackedRadialGaugeSeriesProps, FC<Partial<RadialGaugeSeriesProps>> | FC<...>>

Gauge series component to render.

`<RadialGaugeSeries />`
idstring

Id of the chart.

widthnumber

Width of the chart. If not provided will autosize.

heightnumber

Height of the chart. If not provided will autosize.

marginsMargins

Margins for the chart.

classNamestring

Classnames for the chart.

containerClassNamestring

Classnames for the chart.

styleStyleHTMLAttributes<SVGSVGElement>

Additional css styles.

centerboolean

Center the chart. Used mainly internally.

centerXboolean

Center chart on X Axis only. Used mainly internally.

centerYboolean

Center chart on Y Axis only. Used mainly internally.

RadialGaugeSeriesΒ 

NameTypeDefault
idstring

Unique id for the series.

dataChartShallowDataShape[]

Data to render set by RadialGauge component.

scaleany

D3 scale function set by RadialGauge component.

startAnglenumber

Start angle set by RadialGauge component.

endAnglenumber

Start angle set by RadialGauge component.

arcWidthnumber

The β€œthickness” of the arcs

5
widthnumber

Width set by RadialGauge component.

heightnumber

Height set by RadialGauge component.

paddingnumber

Padding between each gauge.

20
colorSchemeColorSchemeType

Color scheme to apply.

['#00ECB1']
innerArcReactElement<RadialGaugeArcProps, FC<Partial<RadialGaugeArcProps>>>

Arc component.

`<RadialGaugeArc />`
outerArcReactElement<RadialGaugeArcProps, FC<Partial<RadialGaugeArcProps>>> | null

Outer arc component. This is the β€˜fill’ element.

`<RadialGaugeOuterArc />`
labelReactElement<RadialGaugeLabelProps, FC<Partial<RadialGaugeLabelProps>>> | null

Label component.

`<RadialGaugeLabel />`
valueLabelReactElement<RadialGaugeValueLabelProps, FC<Partial<RadialGaugeValueLabelProps>>> | null

Value label component.

`<RadialGaugeValueLabel />`
minGaugeWidthnumber

Min width for a gauge. Only applicable in multi-series gauges.

50

StackedRadialGaugeSeriesΒ 

NameTypeDefault
dataChartDataShape[]

Data to render set by RadialGauge component.

scaleany

D3 scale function set by RadialGauge component.

startAnglenumber

Start angle set by RadialGauge component.

endAnglenumber

Start angle set by RadialGauge component.

widthnumber

Width set by RadialGauge component.

heightnumber

Height set by RadialGauge component.

colorSchemeColorSchemeType

Color scheme to apply.

['#00ECB1']
innerArcReactElement<RadialGaugeArcProps, FC<Partial<RadialGaugeArcProps>>>

Arc component.

`<RadialGaugeArc animated />`
stackedInnerArcReactElement<RadialGaugeStackedArcProps, FC<Partial<RadialGaugeStackedArcProps>>>

Stacked Arc component.

`<RadialGaugeStackedArc animated />`
outerArcReactElement<RadialGaugeArcProps, FC<Partial<RadialGaugeArcProps>>> | null

Outer arc component. This is the β€˜fill’ element.

`<RadialGaugeArc disabled animated={false} />`
labelReactElement<StackedRadialGaugeValueLabelProps, FC<Partial<StackedRadialGaugeValueLabelProps>>> | null

Label component.

`<StackedRadialGaugeValueLabel />`
descriptionLabelReactElement<StackedRadialGaugeDescriptionLabelProps, FC<Partial<StackedRadialGaugeDescriptionLabelProps>>> | null

Description label component.

fillFactornumber

A factor from 0 to 1 determining how much of the Gauge should be filled with arcs

0.2
arcPaddingnumber

Padding between the stacked arcs, following d3 bandwidth innerPadding

0.15

RadialGaugeArcΒ 

NameTypeDefault
idstring

ID generated by the chart.

dataChartShallowDataShape

Data set by the RadialGaugeSeries components.

startAnglenumber

Start angle set by the RadialGaugeSeries components.

endAnglenumber

End angle set by the RadialGaugeSeries components.

innerRadiusnumber

Inner radius set by the RadialGaugeSeries components.

outerRadiusnumber

Outer radius set by the RadialGaugeSeries components.

colorany

Color set by the RadialGaugeSeries components.

'#353d44'
cornerRadiusnumber0
padAnglenumber

Pad Angle between adjacent arcs, see https://github.com/d3/d3-shape#arc_padAngleΒ 

0
padRadiusnumber

Pad Radius between adjacent arcs, see https://github.com/d3/d3-shape#arc_padRadiusΒ 

animatedboolean

Animation set by the RadialGaugeSeries component.

true
disabledboolean

Disable the interactions.

false
fillstring

Fill the arc.

gradientReactElement<GradientProps, FC<Partial<GradientProps>>> | null

Gradient shades for the bar.

tooltipReactElement<ChartTooltipProps, FC<Partial<ChartTooltipProps>>> | null

Tooltip component.

`<ChartTooltip />`
onClick(event: any) => void

Event for when the arc is clicked.

onMouseEnter(event: any) => void

Event for when the arc has mouse enter.

onMouseLeave(event: any) => void

Event for when the arc has mouse leave.

RadialGaugeLabelΒ 

NameTypeDefault
dataChartShallowDataShape

Data set by the RadialGaugeSeries component.

offsetnumber

Offset set by the RadialGaugeSeries component.

classNameany

Classname to apply to the label.

onClick(event: { data: any; nativeEvent: any; }) => void

Label click event.

StackedRadialGaugeValueLabelΒ 

NameTypeDefault
labelstring

A label shown at the center

classNamestring

A class name to apply

yOffsetnumber

A y offset to apply to the label

0

StackedRadialGaugeDescriptionLabelΒ 

NameTypeDefault
labelstring

A label shown at the center

classNamestring

A class name to apply

yOffsetnumber

A y offset to apply to the label

0

RadialGaugeValueLabelΒ 

NameTypeDefault
dataChartShallowDataShape

Data set by the RadialGaugeSeries component.

classNameany

Classname to apply to the value label.

Last updated on