BcPieChart
Description
The BcPieChart component displays data as proportional slices of a circle, ideal for showing parts of a whole. It supports interactive slice hovering with pop-out effect, percentage display, and customizable styling options.
Demo
Show Percentage
Show Legend
Sample Code
Parameters
Data
List < BcPieChartData >
List of data items to display in the chart. Each item contains a label, value, and color.
Options
BcPieChartOptions
Configuration options for the chart appearance and behavior.
BcPieChartOptions Properties
Size
int
The size (width and height) of the chart canvas in pixels.
ShowLegend
bool
Whether to display the legend.
ShowPercentage
bool
Whether to display percentage values on slices.
PercentageTextColor
string
The color of the percentage text on slices.
Style
string?
Additional CSS styles to apply to the chart container.
HoverScale
double
The scale factor for slices when hovered.
LegendTextColor
string
The color of the legend text.
LegendFontSize
int
The font size of legend text in pixels.
Data Classes
Contains Label (string), Value (double), and Color (string) properties.