Quantitative

class Quantitative<DOMAIN>(accessor: Datum<DOMAIN>.() -> Double?, parentDimension: Quantitative<DOMAIN>?, init: Quantitative<DOMAIN>.() -> Unit) : ContinuousDimension<DOMAIN, Double?>

Quantitative is a Dimension that is used to manage continuous numeric values (as Double) It is build by giving an "accessor" lambda that returns a Double object from a given Datum of a <DOMAIN>.

Use the Chart.quantitative function to build a Quantitative dimension.

Examples:

  • val sizeDimension = quantitative( { domain.size } )

  • val speedDimension = quantitative( { domain.speed } )

Constructors

Quantitative
Link copied to clipboard
common
fun <DOMAIN> Quantitative(accessor: Datum<DOMAIN>.() -> Double?, parentDimension: Quantitative<DOMAIN>? = null, init: Quantitative<DOMAIN>.() -> Unit = {})

Functions

child
Link copied to clipboard
common
fun child(accessor: Datum<DOMAIN>.() -> Double?, init: Quantitative<DOMAIN>.() -> Unit = {}): Quantitative<DOMAIN>
Creates a child Dimension with the given accessor, use child dimensions to share axes with different properties.
invoke
Link copied to clipboard
common
operator fun invoke(datum: Datum<DOMAIN>): Double?
Calling Dimension(Datum) is the same as calling its accessor.

Properties

accessor
Link copied to clipboard
common
val accessor: Datum<DOMAIN>.() -> Double?
The "accessor" is the lambda used to transform a DOMAIN object into a VALUE.
formatter
Link copied to clipboard
common
open var formatter: Double?.() -> String?
The formatter for the VALUE this Dimension can generate.
isContinuous
Link copied to clipboard
common
val isContinuous: Boolean
Is this Dimension considered "continuous"?
isDiscrete
Link copied to clipboard
common
open override val isDiscrete: Boolean
Is this Dimension considered "discrete"?
name
Link copied to clipboard
common
var name: String?
The name of this Dimension, this name is used as the title of the Axis based on it.