BcBarChart
Description
The BcBarChart component displays data as grouped vertical bars, ideal for comparing values across categories. It supports multiple data series, hover effects, tooltips, and customizable styling options.
Demo
Show Grid
Show Labels
Show Values
Show Legend
Show X Axis
Show Y Axis
Width
Height
Sample Code
Parameters
Data
List < BcBarChartSeries >
List of data series to display in the chart. Each series contains a label, color, and list of values.
Options
BcBarChartOptions
Configuration options for the chart appearance and behavior.
BcBarChartOptions Properties
Width
int
The width of the chart canvas in pixels.
Height
int
The height of the chart canvas in pixels.
Style
string?
Additional CSS styles to apply to the chart container.
ShowXAxis
bool
Whether to display the X axis line.
ShowYAxis
bool
Whether to display the Y axis line.
AxisColor
string
The color of the axis lines.
AxisLineWidth
double
The width of the axis lines.
ShowGrid
bool
Whether to display grid lines.
GridColor
string
The color of the grid lines.
ShowLabels
bool
Whether to display axis labels.
LabelColor
string
The color of the axis labels.
LabelFontSize
int
The font size of axis labels in pixels.
ShowValues
bool
Whether to display values on the bars.
ValueColor
string
The color of the value text on bars.
BarSpacing
double
The spacing between bars within a group (0-1).
GroupSpacing
double
The spacing between bar groups (0-1).
HoverOpacity
double
The opacity of bars when hovered.
ShowLegend
bool
Whether to display the legend.
LegendTextColor
string
The color of the legend text.
LegendFontSize
int
The font size of legend text in pixels.
PaddingLeft
double
Left padding of the chart area.
PaddingRight
double
Right padding of the chart area.
PaddingTop
double
Top padding of the chart area.
PaddingBottom
double
Bottom padding of the chart area.
Data Classes
Contains Label (string), Color (string), and Values (List<BcBarChartValue>) properties.
Contains Category (string) and Value (double) properties.