LineChart

constructor(line: LineChart.LineSpec, spacingDp: Float, targetVerticalAxisPosition: AxisPosition.Vertical? = null)

Creates a LineChart with a common style for all lines.

Parameters

line

a LineSpec defining the style of each line.

spacingDp

the spacing between each LineSpec.point (in dp).

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(lines: List<LineChart.LineSpec> = listOf(LineSpec()), spacingDp: Float = DefaultDimens.POINT_SPACING, targetVerticalAxisPosition: AxisPosition.Vertical? = null, drawingModelInterpolator: DrawingModelInterpolator<LineChartDrawingModel.PointInfo, LineChartDrawingModel> = DefaultDrawingModelInterpolator())

Parameters

lines

a List of LineSpecs defining the style of each line.

spacingDp

the spacing between each LineSpec.point (in dp).

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.

drawingModelInterpolator

interpolates the LineChart’s LineChartDrawingModels.