Skip to Content

Bar List

A Bar List is a horizontal bar chart with labels, ideal for comparing quantities and visualizing categorical data. In REAVIZ, the Bar List consists of horizontal bars that represent different categories, each labeled with its corresponding value.

Where to use:

  • Compare Quantities: Ideal for comparing different categories.
  • Show Rankings: Useful for displaying rankings or ordered lists.
  • Visualize Categorical Data: Great for data with distinct categories.

Quick Start

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

Examples

API

BarListΒ 

NameTypeDefault
idstring

ID for the chart.

classNamestring

CSS Classname for the element.

styleCSSProperties

Style for the element.

dataChartShallowDataShape[]

Data for the chart.

[]
sortDirection"asc" | "desc" | "none"

Sort direction of the data.

'desc'
seriesReactElement<BarListSeriesProps, FC<BarListProps>>

Series to render.

`<BarListSeries />`
type"percent" | "count"

Whether the values are percentages or absolute values. In the latter case, the chart would be relative

'count'

BarListSeriesΒ 

NameTypeDefault
dataChartShallowDataShape[]

Data for the chart.

colorSchemeColorSchemeType

Color scheme for the chart.

'cybertron'
labelPositionBarListLabelPosition

The label position.

'top'
valuePositionBarListLabelPosition

The value position.

'none'
itemClassNamestring

The bar item class name.

labelClassNamestring

Label css class name.

valueClassNamestring

Label value class name.

barClassNamestring

Bar component class name.

outerBarClassNamestring

Bar container class name.

labelFormat(data: ChartInternalDataTypes, index: number) => any

Custom label format.

valueFormat(data: ChartInternalDataTypes, index: number) => any

Custom value format

onItemClick(data: ChartShallowDataShape) => void

Item was clicked.

onItemMouseEnter(data: ChartShallowDataShape) => void

Item had mouse enter.

onItemMouseLeave(data: ChartShallowDataShape) => void

Item had mouse leave.

Last updated on