Package io.github.koalaplot.core.bar

Types

Link copied to clipboard
class AxisSettings

Specifies the settings for an Axis.

Link copied to clipboard
interface BarChartEntry<X, Y>

An interface that defines a data element to be plotted on a Bar chart.

Link copied to clipboard
interface BarScope : HoverableElementAreaScope
Link copied to clipboard
class BulletBuilderScope

A scope for configuring a bullet graph.

Link copied to clipboard
annotation class BulletGraphDslMarker
Link copied to clipboard
class BulletGraphScope

A scope for constructing displays that layout and align features among multiple bullet graphs.

Link copied to clipboard
data class DefaultBarChartEntry<X, Y>(    val xValue: X,     val yMin: Y,     val yMax: Y) : BarChartEntry<X, Y>

Default implementation of a BarChartEntry.

Link copied to clipboard
class Fixed(size: Dp) : LabelWidth

Set the label width as a fixed size in Dp. If the label is smaller than the size it will be right-justified to the graph.

Link copied to clipboard
class FixedFraction(fraction: Float) : LabelWidth

Set the label width as a fixed fraction of the overall graph width. If the label is smaller than the fixed fraction it will be right-justified to the graph.

Link copied to clipboard
sealed class LabelWidth

Sealed class hierarchy to designate the label area width type and values.

Link copied to clipboard
open class Slot<T>(default: T)

A slot to hold a configurable value in the bullet graph dsl.

Link copied to clipboard
class VariableFraction(fraction: Float) : LabelWidth

Set the label width as a variable fraction of the overall graph width. If the label is smaller than the fraction the graph will grow to occupy the available space.

Link copied to clipboard
typealias VerticalBarComposable<E> = @Composable BarScope.(series: Int, index: Int, value: E) -> Unit

Defines a Composable function used to emit a vertical bar. The parameter series is the chart data series index. The parameter index is the element index within the series. The parameter value is the value of the element.

Functions

Link copied to clipboard
fun BulletGraph(    modifier: Modifier = Modifier,     animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec,     builder: BulletBuilderScope.() -> Unit)

Implementation of a bullet graph as defined in http://www.perceptualedge.com/articles/misc/Bullet_Graph_Design_Spec.pdf.

Link copied to clipboard
fun BulletGraphs(    modifier: Modifier = Modifier,     gap: Dp = KoalaPlotTheme.sizes.gap,     animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec,     builder: BulletGraphScope.() -> Unit)

A vertical layout of multiple bullet graphs. Each bullet will equally share the vertical space and be the same height. The left and right edges of all bullets will be aligned horizontally.

Link copied to clipboard
fun BarScope.DefaultVerticalBar(    brush: Brush,     modifier: Modifier = Modifier,     shape: Shape = RectangleShape,     border: BorderStroke? = null,     hoverElement: @Composable () -> Unit = {})

A default implementation of a bar for bar charts.

Link copied to clipboard
fun DiamondIndicator(color: Color = MaterialTheme.colors.primary, size: Dp)
fun DiamondIndicator(color: Color = MaterialTheme.colors.primary, sizeFraction: Float = DefaultSizeFraction)

A diamond-shaped indicator that may be used as a feature marker.

Link copied to clipboard
fun HorizontalBarIndicator(    brush: Brush,     modifier: Modifier = Modifier,     fraction: Float = 1.0f,     shape: Shape = RectangleShape,     border: BorderStroke? = null)

A default implementation of a bar indicator that can be used for the featured measure or qualitative ranges.

Link copied to clipboard
fun LineIndicator(    color: Color = MaterialTheme.colors.primary,     heightFraction: Float = DefaultSizeFraction,     width: Dp = 2.dp)

A line for comparative measure indicators.

Link copied to clipboard
fun <X, Y, E : BarChartEntry<X, Y>> XYChartScope<X, Y>.VerticalBarChart(    series: List<List<E>>,     modifier: Modifier = Modifier,     bar: VerticalBarComposable<E> = { i, _, _ -> val colors = remember(series.size) { generateHueColorPalette(series.size) } DefaultVerticalBar( brush = SolidColor(colors[i]), modifier = Modifier.fillMaxWidth(KoalaPlotTheme.sizes.barWidth) ) },     stacked: Boolean = false,     maxBarGroupWidth: Float = 0.9f,     animationSpec: AnimationSpec<Float> = KoalaPlotTheme.animationSpec)

A VerticalBarChart to be used in an XYChart and that can plot multiple series either side-by-side or stacked as a stacked bar chart.