MarkerComponent

open class MarkerComponent(val label: TextComponent, val indicator: Component?, val guideline: LineComponent?) : Marker

The default implementation of the Marker interface.

Parameters

label

the TextComponent used to draw the label.

indicator

an optional indicator drawn at a given point belonging to the data entry.

guideline

an optional line drawn from the bottom of the chart to the bottom edge of the label.

Constructors

Link copied to clipboard
constructor(label: TextComponent, indicator: Component?, guideline: LineComponent?)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The indicator size (in dp).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var onApplyEntryColor: (entryColor: Int) -> Unit?

An optional lambda function that allows for applying the color associated with a given data entry to a Component.

Functions

Link copied to clipboard
open override fun draw(context: DrawContext, bounds: RectF, markedEntries: List<Marker.EntryModel>, chartValuesProvider: ChartValuesProvider)

Draws the marker.

Link copied to clipboard
open override fun getInsets(context: MeasureContext, outInsets: Insets, horizontalDimensions: HorizontalDimensions)

Called during the measurement phase, before getHorizontalInsets. Both horizontal and vertical insets can be requested from this function. The final inset for a given edge of the associated Chart is the largest of the insets requested for the edge.