ChartDrawContext

An extension of DrawContext that holds additional data required to render a Chart.

Properties

Link copied to clipboard
abstract val chartBounds: RectF

The bounds in which the Chart will be drawn.

Link copied to clipboard

Holds information on the Chart’s horizontal dimensions.

Link copied to clipboard
abstract val horizontalScroll: Float

The current amount of horizontal scroll.

Link copied to clipboard
abstract val markerTouchPoint: Point?

The point inside the chart’s coordinates where physical touch is occurring.

Link copied to clipboard
abstract val zoom: Float

The zoom factor.

Functions

Link copied to clipboard
fun <Model : ChartEntryModel> ChartDrawContext.drawMarker(marker: Marker, markerTouchPoint: Point?, chart: Chart<Model>, markerVisibilityChangeListener: MarkerVisibilityChangeListener?, wasMarkerVisible: Boolean, setWasMarkerVisible: (Boolean) -> Unit, lastMarkerEntryModels: List<Marker.EntryModel>, onMarkerEntryModelsChange: (List<Marker.EntryModel>) -> Unit)

Draws the provided marker on top of the chart at the given markerTouchPoint and notifies the markerVisibilityChangeListener about the marker’s visibility changes.

Link copied to clipboard

Returns the maximum scroll distance.