ColumnChart

constructor(column: LineComponent, spacingDp: Float = DefaultDimens.COLUMN_OUTSIDE_SPACING, targetVerticalAxisPosition: AxisPosition.Vertical? = null)

Creates a ColumnChart with a common style for all columns.

Parameters

column

a LineComponent defining the appearance of the columns.

spacingDp

the distance between neighboring column collections.

targetVerticalAxisPosition

if this is set, any AxisRenderer with an AxisPosition equal to the provided value will use the ChartValues provided by this chart. This is meant to be used with ComposedChart.


constructor()

Creates a ColumnChart instance with columns set to an empty list. The list must be populated before the chart is drawn.


constructor(columns: List<LineComponent>, spacingDp: Float = DefaultDimens.COLUMN_OUTSIDE_SPACING, innerSpacingDp: Float = DefaultDimens.COLUMN_INSIDE_SPACING, mergeMode: ColumnChart.MergeMode = MergeMode.Grouped, targetVerticalAxisPosition: AxisPosition.Vertical? = null, dataLabel: TextComponent? = null, dataLabelVerticalPosition: VerticalPosition = VerticalPosition.Top, dataLabelValueFormatter: ValueFormatter = DecimalFormatValueFormatter(), dataLabelRotationDegrees: Float = 0.0f, drawingModelInterpolator: DrawingModelInterpolator<ColumnChartDrawingModel.ColumnInfo, ColumnChartDrawingModel> = DefaultDrawingModelInterpolator())

Parameters

columns

the LineComponent instances to use for columns. This list is iterated through as many times as necessary for each column collection. If the list contains a single element, all columns have the same appearance.

spacingDp

the distance between neighboring column collections.

innerSpacingDp

the distance between neighboring grouped columns.

mergeMode

defines how columns should be drawn in column collections.

targetVerticalAxisPosition

if this is set, any AxisRenderer with an AxisPosition equal to the provided value will use the ChartValues provided by this chart. This is meant to be used with ComposedChart.

dataLabel

an optional TextComponent to use for data labels.

dataLabelVerticalPosition

the vertical position of data labels relative to the top of their respective columns.

dataLabelValueFormatter

the ValueFormatter to use for data labels.

dataLabelRotationDegrees

the rotation of data labels (in degrees).

drawingModelInterpolator

interpolates the ColumnChart’s ColumnChartDrawingModels.