style

fun style(pieColor: Color = MaterialTheme.colorScheme.primary, pieColors: List<Color> = emptyList(), borderColor: Color = MaterialTheme.colorScheme.surface, innerPadding: Dp = 15.dp, donutPercentage: Float = 0.0f, borderWidth: Float = 3.0f, chartViewStyle: ChartViewStyle = ChartViewDefaults.style()): PieChartStyle

Returns a PieChartStyle with the provided parameters or their default values.

Parameters

pieColor

The color to be used for the pie chart if pieColors is empty. Defaults to the primary color of the MaterialTheme.

pieColors

The colors to be used for the slices in the pie chart. Defaults to an empty list.

borderColor

The color of the border around the pie chart. Defaults to the surface color of the MaterialTheme.

innerPadding

The inner padding of the pie chart. Defaults to 15.dp.

donutPercentage

The percentage of the chart that should be a donut hole. Defaults to 0f.

borderWidth

The width of the border around the pie chart. Defaults to 3f.

chartViewStyle

The style to be applied to the chart view. Defaults to the default style of ChartViewDefaults.