BarChart

A highly customizable bar chart wrapper for Chart.js.

Basic Usage

By default, the `BarChart` component renders a horizontal placeholder monthly revenue dataset.

Monthly Revenue

Custom Data

You can pass a custom `data` object and `options` object to completely control the Chart.js configuration, including multi-dataset bar charts.

Quarterly Sales by Category

API Reference

Property
Description
Type
Default

class

Additional CSS classes to apply to the chart container. string -

title

The title of the chart displayed at the top. string -

borderRadius

The border radius of the bars. number 4

data

A valid Chart.js data object. ChartData<'bar'> -

options

A valid Chart.js options object. ChartOptions<'bar'> -