Bullet

@nivo/bullet

Bullet chart supporting multiple ranges/measures/markers.

You can fully customize this chart using custom components via rangeComponent, measureComponent and markerComponent properties.

The responsive alternative of this component is ResponsiveBullet.

Actions Logs
Start interacting with the chart to log actions
Base
object[]required

Chart data.

number | 'auto'optionaldefault:0
auto

Minimum value.

number | 'auto'optionaldefault:'auto'
auto

Maximum value.

numberrequired

Chart width.

numberrequired

Chart height.

objectoptional
px
px
px
px

Chart margin.

stringoptionaldefault:'horizontal'

How to display items.

booleanoptionaldefault:false
   

Reverse chart.

numberoptionaldefault:30
px

define spacing between items.

numberoptionaldefault:0.4

define size of measure related to item size, expressed as a ratio.

numberoptionaldefault:0.6

define size of markers related to item size, expressed as a ratio.

Style
Themeoptional

Define style for common elements such as labels, axes…

string | object | Functionoptionaldefault:{"from":"color"}
inheritthemecustom
inherited property
color
modifiers
No modifier.

Method to compute range border color.

numberoptionaldefault:0
px

Width of range border.

Functionoptional

Custom component for ranges.

string | Function | string[]optionaldefault:'seq:cool'
Cool

Ranges colors

string | object | Functionoptionaldefault:{"from":"color"}
inheritthemecustom
inherited property
color
modifiers
No modifier.

Method to compute measure border color.

numberoptionaldefault:0
px

Width of measure border.

Functionoptional

Custom component for measures.

string | Function | string[]optionaldefault:'seq:red_purple'
Sequential: Red → Purple

Measures colors.

Functionoptional

Custom component for markers.

string | Function| string[]optionaldefault:'seq:red_purple'
Sequential: Red → Purple

Markers colors.

Axes
stringoptionaldefault:'after'

Where to put axis.

Title
stringoptionaldefault:'before'

Where to put title.

stringoptionaldefault:'middle'
start

title alignment.

numberoptionaldefault:0
px

title x offset from bullet edge.

numberoptionaldefault:0
px

title y offset from bullet edge.

numberoptionaldefault:0
°

title rotation.

Interactivity
(range, event) => voidoptional

onClick handler for ranges.

(measure, event) => voidoptional

onClick handler for measures.

(marker, event) => voidoptional

onClick handler for markers.

Motion
booleanoptionaldefault:true
   

Enable/disable transitions.

string | objectoptionaldefault:'default'
default

Motion config for react-spring, either a preset or a custom configuration.