-
public final class ChartDrawContextExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static ChartDrawContextchartDrawContext(Canvas canvas, Integer elevationOverlayColor, MeasureContext measureContext, Point markerTouchPoint, HorizontalDimensions horizontalDimensions, RectF chartBounds, Float horizontalScroll, AutoScaleUp autoScaleUp)The anonymous implementation of ChartDrawContext. final static <Model extends ChartEntryModel> UnitdrawMarker(ChartDrawContext $self, Marker marker, Point markerTouchPoint, Chart<Model> chart, MarkerVisibilityChangeListener markerVisibilityChangeListener, Boolean wasMarkerVisible, Function1<Boolean, Unit> setWasMarkerVisible, List<Marker.EntryModel> lastMarkerEntryModels, Function1<List<Marker.EntryModel>, Unit> onMarkerEntryModelsChange)Draws the provided marker on top of the chart at the given markerTouchPoint and notifies the markerVisibilityChangeListener about the marker’s visibility changes. -
-
Method Detail
-
chartDrawContext
final static ChartDrawContext chartDrawContext(Canvas canvas, Integer elevationOverlayColor, MeasureContext measureContext, Point markerTouchPoint, HorizontalDimensions horizontalDimensions, RectF chartBounds, Float horizontalScroll, AutoScaleUp autoScaleUp)
The anonymous implementation of ChartDrawContext.
- Parameters:
canvas- the canvas on which the Chart is to be drawn.elevationOverlayColor- the color of elevation overlays, applied to ShapeComponents that cast shadows.measureContext- holds data used for component measurements.markerTouchPoint- the point inside the chart’s bounds where physical touch is occurring.horizontalDimensions- holds information on the Chart’s horizontal dimensions.chartBounds- the bounds in which the Chart will be drawn.horizontalScroll- the horizontal scroll.autoScaleUp- defines whether the content of a scrollable chart should be scaled up when the dimensions are such that, at a scale factor of 1, an empty space would be visible near the end edge of the chart.
-
drawMarker
final static <Model extends ChartEntryModel> Unit drawMarker(ChartDrawContext $self, Marker marker, Point markerTouchPoint, Chart<Model> chart, MarkerVisibilityChangeListener markerVisibilityChangeListener, Boolean wasMarkerVisible, Function1<Boolean, Unit> setWasMarkerVisible, List<Marker.EntryModel> lastMarkerEntryModels, Function1<List<Marker.EntryModel>, Unit> onMarkerEntryModelsChange)
Draws the provided marker on top of the chart at the given markerTouchPoint and notifies the markerVisibilityChangeListener about the marker’s visibility changes.
-
-
-
-