Doughnut Chart

A donut chart is a type of pie chart that displays data in the form of circular segments with an empty center, often used to represent proportions.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab

Doughnut Chart Preview

Usage

import id.co.biofarma.binduiandroid.components.doughnutchart.BiofarmaDoughnutChart
BiofarmaDoughnutChart(
                labels = labels,
                values = values,
                size = size,
                legendPosition = legendPosition,
                centerValue = centerValue
            )

Examples

Size

Use size parameter to set the size of the chart. There are three sizes available: sm, md and lg.


Legend Position

Use legendPosition parameter to set the position of the legend.

Doughnut Chart Legend Position Preview

Doughnut Chart Legend Position Preview Top


Center Value of Chart

Use centerValue parameter to set the specific data in the circle.

Doughnut Chart Legend Position Preview


Props

PropsRequiredDefaultTypedescription
idfalse-StringA unique identifier for the pie chart.
sizefalsemdsm md lgSize of pie chart.
legendPositionfalse-top bottomLocations of the legend.
labelsfalseList<>List<String>The labels corresponding to the data list.
valuesfalseList<>List<Double>The values corresponding to the data list.
centerValuefalseStringThe value corresponding to the specific data in the circle.
BIND © Biofarma Innovate Next-level Design .