Docs
📊 ⏐ Charts
Bar List

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 (opens in a new tab)

PropDescriptionDefault
idID for the chart.
string
classNameCSS Classname for the element.
string
styleStyle for the element.
CSSProperties
dataData for the chart.
ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>[]
[]
sortDirectionSort direction of the data.
"asc" | "desc" | "none"
desc
seriesSeries to render.
ReactElement<BarListSeriesProps, FC<BarListProps>>
<BarListSeries />
typeWhether the values are percentages or absolute values. In the latter case, the chart would be relative
"percent" | "count"
count

BarListSeries (opens in a new tab)

PropDescriptionDefault
dataData for the chart.
ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>[]
colorSchemeColor scheme for the chart.
ColorSchemeType
cybertron
labelPositionThe label position.
BarListLabelPosition
top
valuePositionThe value position.
BarListLabelPosition
none
itemClassNameThe bar item class name.
string
labelClassNameLabel css class name.
string
valueClassNameLabel value class name.
string
barClassNameBar component class name.
string
outerBarClassNameBar container class name.
string
labelFormatCustom label format.
(data: ChartInternalDataTypes, index: number) => any
valueFormatCustom value format
(data: ChartInternalDataTypes, index: number) => any
onItemClickItem was clicked.
(data: ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>) => void
onItemMouseEnterItem had mouse enter.
(data: ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>) => void
onItemMouseLeaveItem had mouse leave.
(data: ChartShallowDataShape<ChartDataTypes | [ChartDataTypes, ChartDataTypes]>) => void