BaseChartView

The base for Views that display a chart. Subclasses define a Model implementation they can handle.

Inheritors

Properties

Link copied to clipboard

Defines whether the content of the 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.

Link copied to clipboard
Link copied to clipboard

The Chart displayed by this View.

Link copied to clipboard

Houses scrolling-related settings.

Link copied to clipboard
var dispatcher: CoroutineDispatcher

The CoroutineDispatcher to be used for the handling of difference animations.

Link copied to clipboard

The color of elevation overlays, which are applied to ShapeComponents that cast shadows.

Link copied to clipboard
Link copied to clipboard

A ChartModelProducer can provide Model updates asynchronously.

Link copied to clipboard

Applies a horizontal fade to the edges of the chart area for scrollable charts.

Link copied to clipboard
var getXStep: (Model) -> Float?

Overrides the x step (the difference between the x values of neighboring major entries). If this is null, the default x step (ChartEntryModel.xGcd) is used.

Link copied to clipboard

Defines how the chart’s content is positioned horizontally.

Link copied to clipboard

Whether the chart can be scrolled horizontally.

Link copied to clipboard

Whether the pinch-to-zoom gesture is enabled.

Link copied to clipboard

The legend for this chart.

Link copied to clipboard

The Marker for this chart.

Link copied to clipboard

Allows for listening to marker visibility changes.

Link copied to clipboard
var model: Model?

The Model for this BaseChartView’s Chart instance (chart).

Link copied to clipboard

Whether to display an animation when the chart is created. In this animation, the value of each chart entry is animated from zero to the actual value.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun addView(child: View, index: Int, params: ViewGroup.LayoutParams?)
Link copied to clipboard
fun animateScrollBy(getDelta: (value: Float, maxValue: Float) -> Float)

Invokes the provided function block, passing to it the current scroll amount and the maximum scroll amount, and scrolls the chart by the number of pixels returned by the function block, using a ValueAnimator. Customize the animation with setAnimatedScrollDuration and setAnimatedScrollInterpolator.

Link copied to clipboard
open override fun onRtlPropertiesChanged(layoutDirection: Int)
Link copied to clipboard
open override fun onTouchEvent(event: MotionEvent): Boolean
Link copied to clipboard
open override fun onViewRemoved(child: View?)
Link copied to clipboard
open override fun registerScrollListener(scrollListener: ScrollListener)
Link copied to clipboard
open override fun removeScrollListener(scrollListener: ScrollListener)
Link copied to clipboard
fun scrollBy(getDelta: (value: Float, maxValue: Float) -> Float)

Invokes the provided function block, passing to it the current scroll amount and the maximum scroll amount, and scrolls the chart by the number of pixels returned by the function block.

Link copied to clipboard
fun setAnimatedScrollDuration(durationMillis: Long)

Sets the duration (in milliseconds) of animated scrolls (animateScrollBy).

Link copied to clipboard

Sets the Interpolator for animated scrolls (animateScrollBy).

Link copied to clipboard
fun setDiffAnimationDuration(durationMillis: Long)

Sets the duration (in milliseconds) of difference animations.

Link copied to clipboard

Sets the Interpolator for difference animations.

Link copied to clipboard
fun setModel(model: Model?)

Sets the Model for this BaseChartView’s Chart instance (chart).

Link copied to clipboard
fun setPlaceholder(view: View?, params: FrameLayout.LayoutParams? = null)

Updates the placeholder, which is shown when no ChartEntryModel is available.