style

fun style(areaColor: Color = MaterialTheme.colorScheme.primary, areaColors: List<Color> = emptyList(), fillAlpha: Float = defaultChartAlpha(), lineVisible: Boolean = true, lineColor: Color = MaterialTheme.colorScheme.primary, lineColors: List<Color> = emptyList(), lineWidth: Float = 4.0f, bezier: Boolean = false, chartViewStyle: ChartViewStyle = ChartViewDefaults.style(), zoomControlsVisible: Boolean = true, yAxisLabelsVisible: Boolean = true, yAxisLabelColor: Color = defaultYAxisLabelColor(), yAxisLabelSize: TextUnit = 11.sp, yAxisLabelCount: Int = 5, xAxisLabelsVisible: Boolean = true, xAxisLabelColor: Color = defaultXAxisLabelColor(), xAxisLabelSize: TextUnit = 11.sp, xAxisLabelMaxCount: Int = 6): StackedAreaChartStyle

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

Parameters

areaColor

The fallback fill color used when areaColors is empty. Defaults to the primary theme color.

areaColors

The explicit fill colors used for stacked areas. Defaults to an empty list.

fillAlpha

The alpha value applied to area fills. Defaults to 0.4f in light theme and 0.6f in dark theme.

lineVisible

Whether boundary lines are shown on top of filled areas. Defaults to true.

lineColor

The fallback boundary line color used when lineColors is empty. Defaults to the primary theme color.

lineColors

The explicit boundary line colors. Defaults to an empty list.

lineWidth

The stroke width of boundary lines. Defaults to 4f.

bezier

Whether curved lines are used for area boundaries. Defaults to false.

chartViewStyle

The style to be applied to the chart view. Defaults to ChartViewDefaults.style().

zoomControlsVisible

Whether zoom controls are shown in expanded dense mode. Defaults to true.

yAxisLabelsVisible

Whether Y-axis labels are shown. Defaults to true.

yAxisLabelColor

The color of Y-axis labels. Defaults to a theme-based onSurface variant.

yAxisLabelSize

The text size of Y-axis labels. Defaults to 11.sp.

yAxisLabelCount

Number of Y-axis labels. Defaults to 5.

xAxisLabelsVisible

Whether X-axis labels are shown. Defaults to true.

xAxisLabelColor

The color of X-axis labels. Defaults to a theme-based onSurface variant.

xAxisLabelSize

The text size of X-axis labels. Defaults to 11.sp.

xAxisLabelMaxCount

Maximum number of X-axis labels to display. Defaults to 6.