BarChartDefaults

Defaults factory for BarChartStyle. All parameters have theme-aware defaults.

Properties

Link copied to clipboard

Default axis formatter, omitting only the terminal .0 on whole values.

Link copied to clipboard

Default formatter for selected values in the title and legend.

Functions

Link copied to clipboard
fun bars(color: Color = StyleDefaults.seriesColor, colors: List<Color> = emptyList(), gradient: ChartGradient? = null, alpha: Float = StyleDefaults.seriesAlpha, space: Dp = StyleDefaults.barSpacing, minBarWidth: Dp = StyleDefaults.minBarWidth): BarBarsStyle

Returns a BarBarsStyle with bar-aware defaults.

Link copied to clipboard
fun range(min: Double? = null, max: Double? = null): BarRangeStyle

Returns a BarRangeStyle for the optional fixed Y-axis range.

Link copied to clipboard
fun selection(visible: Boolean = true, color: Color = StyleDefaults.selectionColor, width: Dp = StyleDefaults.lineWidth, unselectedAlpha: Float = StyleDefaults.unselectedAlpha): BarSelectionStyle

Returns a BarSelectionStyle for the selection indicator.

Link copied to clipboard
fun style(chartContainerStyle: ChartContainerStyle = ChartContainerDefaults.style(), bars: BarBarsStyle = bars(), range: BarRangeStyle = range(), axes: AxesStyle = AxesDefaults.style(), selection: BarSelectionStyle = selection(), zoomControlsVisible: Boolean = true): BarChartStyle

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

Link copied to clipboard
fun xLabels(visible: Boolean = StyleDefaults.axisLabelsVisible, color: Color = StyleDefaults.axisLabelColor, size: TextUnit = StyleDefaults.axisLabelSize, maxCount: Int? = StyleDefaults.axisLabelMaxCount): AxisLabelStyle

Returns an AxisLabelStyle for X-axis labels.

Link copied to clipboard
fun yLabels(visible: Boolean = StyleDefaults.axisLabelsVisible, color: Color = StyleDefaults.axisLabelColor, size: TextUnit = StyleDefaults.axisLabelSize, maxCount: Int? = StyleDefaults.axisLabelMaxCount): AxisLabelStyle

Returns an AxisLabelStyle for Y-axis labels.