-
public final class LineChartKt
-
-
Method Summary
Modifier and Type Method Description final static LineChartlineChart(List<LineChart.LineSpec> lines, Dp spacing, List<Decoration> decorations, Map<Float, Marker> persistentMarkers, AxisValuesOverrider<ChartEntryModel> axisValuesOverrider, AxisPosition.Vertical targetVerticalAxisPosition, DrawingModelInterpolator<LineChartDrawingModel.PointInfo, LineChartDrawingModel> drawingModelInterpolator)Creates a LineChart. final static LineChart.LineSpeclineSpec(Color lineColor, Dp lineThickness, DynamicShader lineBackgroundShader, StrokeCap lineCap, Component point, Dp pointSize, TextComponent dataLabel, VerticalPosition dataLabelVerticalPosition, ValueFormatter dataLabelValueFormatter, Float dataLabelRotationDegrees, LineChart.LineSpec.PointConnector pointConnector)Creates a LineChart.LineSpec for use in LineCharts. final static LineChart.LineSpeclineSpec(Color lineColor, Dp lineThickness, DynamicShader lineBackgroundShader, StrokeCap lineCap, Float cubicStrength, Component point, Dp pointSize, TextComponent dataLabel, VerticalPosition dataLabelVerticalPosition, ValueFormatter dataLabelValueFormatter, Float dataLabelRotationDegrees)Creates a LineChart.LineSpec for use in LineCharts. -
-
Method Detail
-
lineChart
@Composable() final static LineChart lineChart(List<LineChart.LineSpec> lines, Dp spacing, List<Decoration> decorations, Map<Float, Marker> persistentMarkers, AxisValuesOverrider<ChartEntryModel> axisValuesOverrider, AxisPosition.Vertical targetVerticalAxisPosition, DrawingModelInterpolator<LineChartDrawingModel.PointInfo, LineChartDrawingModel> drawingModelInterpolator)
Creates a LineChart.
- Parameters:
lines- the LineChart.LineSpecs to use for the lines.spacing- the distance between neighboring major entries’ points.decorations- the list of Decorations that will be added to the LineChart.persistentMarkers- maps x-axis values to persistent Markers.axisValuesOverrider- overrides the minimum and maximum x-axis and y-axis values.targetVerticalAxisPosition- if this is set, any AxisRenderer with an AxisPosition equal to the provided value will use the ChartValues provided by this chart.drawingModelInterpolator- interpolates the LineChart’s LineChartDrawingModels.
-
lineSpec
final static LineChart.LineSpec lineSpec(Color lineColor, Dp lineThickness, DynamicShader lineBackgroundShader, StrokeCap lineCap, Component point, Dp pointSize, TextComponent dataLabel, VerticalPosition dataLabelVerticalPosition, ValueFormatter dataLabelValueFormatter, Float dataLabelRotationDegrees, LineChart.LineSpec.PointConnector pointConnector)
Creates a LineChart.LineSpec for use in LineCharts.
- Parameters:
lineColor- the color of the line.lineThickness- the thickness of the line.lineBackgroundShader- an optional DynamicShader to use for the area below the line.lineCap- the stroke cap for the line.point- an optional Component that can be drawn at a given point on the line.pointSize- the size of the point.dataLabel- an optional TextComponent to use for data labels.dataLabelVerticalPosition- the vertical position of data labels relative to the line.dataLabelValueFormatter- the ValueFormatter to use for data labels.dataLabelRotationDegrees- the rotation of data labels in degrees.pointConnector- the LineSpec.PointConnector for the line.
-
lineSpec
@Deprecated(message = Rather than using this `lineSpec` function and its `cubicStrength` parameter, use the `lineSpec` function with the `pointConnector` parameter and provide a `DefaultPointConnector` instance with a custom `cubicStrength` via the `pointConnector` parameter., replaceWith = @ReplaceWith(imports = {com.patrykandpatrick.vico.core.chart.DefaultPointConnector}, expression = lineSpec( lineColor = lineColor, lineThickness = lineThickness, lineBackgroundShader = lineBackgroundShader, lineCap = lineCap, point = point, pointSize = pointSize, dataLabel = dataLabel, dataLabelVerticalPosition = dataLabelVerticalPosition, dataLabelValueFormatter = dataLabelValueFormatter, dataLabelRotationDegrees = dataLabelRotationDegrees, pointConnector = DefaultPointConnector(cubicStrength = cubicStrength), )), level = DeprecationLevel.ERROR) final static LineChart.LineSpec lineSpec(Color lineColor, Dp lineThickness, DynamicShader lineBackgroundShader, StrokeCap lineCap, Float cubicStrength, Component point, Dp pointSize, TextComponent dataLabel, VerticalPosition dataLabelVerticalPosition, ValueFormatter dataLabelValueFormatter, Float dataLabelRotationDegrees)
Creates a LineChart.LineSpec for use in LineCharts.
- Parameters:
lineColor- the color of the line.lineThickness- the thickness of the line.lineBackgroundShader- an optional DynamicShader to use for the area below the line.lineCap- the stroke cap for the line.cubicStrength- the strength of the cubic bezier curve between each key point on the line.point- an optional Component that can be drawn at a given point on the line.pointSize- the size of the point.dataLabel- an optional TextComponent to use for data labels.dataLabelVerticalPosition- the vertical position of data labels relative to the line.dataLabelValueFormatter- the ValueFormatter to use for data labels.dataLabelRotationDegrees- the rotation of data labels in degrees.
-
-
-
-