MutableChartValues

An implementation of ChartValues whose every property is mutable.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override var chartEntryModel: ChartEntryModel

The source of the associated Chart’s entries. The ChartEntryModel defines the default values for minX, maxX, minY, and maxY.

Link copied to clipboard

Returns true if all values have been set and at least one call to tryUpdate or set has been made.

Link copied to clipboard
open override val maxX: Float

The maximum value displayed on the x-axis. By default, this is equal to ChartEntryModel.maxX (the ChartEntryModel instance being chartEntryModel), but you can use AxisValuesOverrider to override this value.

Link copied to clipboard
open override val maxY: Float

The maximum value displayed on the y-axis. By default, this is equal to ChartEntryModel.maxY (the ChartEntryModel instance being chartEntryModel), but you can use AxisValuesOverrider to override this value.

Link copied to clipboard
open override val minX: Float

The minimum value displayed on the x-axis. By default, this is equal to ChartEntryModel.minX (the ChartEntryModel instance being chartEntryModel), but you can use AxisValuesOverrider to override this value.

Link copied to clipboard
open override val minY: Float

The minimum value displayed on the y-axis. By default, this is equal to ChartEntryModel.minY (the ChartEntryModel instance being chartEntryModel), but you can use AxisValuesOverrider to override this value.

Link copied to clipboard
open override val xStep: Float

The difference between the x values of neighboring major entries.

Functions

Link copied to clipboard
fun reset()

Sets minX, maxX, minY, and maxY to 0.

Link copied to clipboard

Creates and returns an immutable copy of this MutableChartValues instance.

Link copied to clipboard
fun tryUpdate(minX: Float? = null, maxX: Float? = null, minY: Float? = null, maxY: Float? = null, xStep: Float? = null, chartEntryModel: ChartEntryModel = this.chartEntryModel): MutableChartValues

Attempts to update the stored values to the provided values. MutableChartValues.minX and MutableChartValues.minY can be updated to a lower value. MutableChartValues.maxX and MutableChartValues.maxY can be updated to a higher value. MutableChartValues.chartEntryModel and MutableChartValues.xStep are always updated.