drawContext
fun drawContext(canvas: Canvas, density: Float = 1.0f, isLtr: Boolean = true, elevationOverlayColor: Long = DefaultColors.Light.elevationOverlayColor, spToPx: (Float) -> Float = { it }): DrawContext
Creates an anonymous implementation of DrawContext.
Parameters
canvas
the canvas to draw the chart on.
density
the pixel density of the screen (used in pixel size calculation).
isLtr
whether the device layout is left-to-right.
elevationOverlayColor
the elevation overlay color. This is applied to components that cast shadows.
spToPx
converts dimensions from sp to px.