Pie Chart

Pie charts express portions of a whole, using arcs or angles within a circle.

TypeResource
DesignFigma
MobileMobile Storybook
CodeGitlab

Pie Chart Preview

Usage

    import id.co.biofarma.binduiandroid.components.piechart.BiofarmaPieChart

Size

Set the size prop to sm, md, or lg.

val labels = listOf("Todo", "In progress", "Testing", "Done", "Reject")
val values = listOf(30.0, 5.0, 15.0, 43.0, 7.0)
val legendPosition = "top"

sm size: Pie Chart SM Preview

md size: Pie Chart MD Preview

lg size: Pie Chart LG Preview

Legend (optional)

Use position and set to top, bottom, or dissapear to place legend position

val labels = listOf("Todo", "In progress", "Testing", "Done")
val values = listOf(30.0, 5.0, 15.0, 43.0, 7.0)
val size = "lg"

legendPosition top: Pie Chart Legend TOP Preview

legendPosition bottom: Pie Chart Legend BOTTOM Preview

legendPosition dissapear: Pie Chart Legend BOTTOM Preview


Props

PropsRequiredDefaultTypedescription
idfalse-StringA unique identifier for the pie chart.
sizefalse-sm md lgSize of pie chart.
legendPositionfalse-top bottom dissapearThe visual size of the chart
labelsfalseList<>List<String>The labels corresponding to the data points.
valuesfalseList<>List<Double>The values corresponding to the data points.
valuesfalseList<>List<Double>The values corresponding to the data points.
BIND © Biofarma Innovate Next-level Design .