-
public final class ChartEntryExtensionsKt
-
-
Method Summary
Modifier and Type Method Description final static FloatEntryentryOf(Float x, Float y)Creates a FloatEntry instance. final static FloatEntryentryOf(Number x, Number y)Creates a FloatEntry instance. final static List<FloatEntry>entriesOf(Pair<Number, Number> pairs)Creates a List of FloatEntry instances. final static List<FloatEntry>entriesOf(Number yValues)Creates a List of FloatEntry instances out of an array of y-axis values. -
-
Method Detail
-
entryOf
final static FloatEntry entryOf(Float x, Float y)
Creates a FloatEntry instance.
- Parameters:
x- the FloatEntry’s x coordinate.y- the FloatEntry’s y coordinate.
-
entryOf
final static FloatEntry entryOf(Number x, Number y)
Creates a FloatEntry instance.
- Parameters:
x- the FloatEntry’s x coordinate.y- the FloatEntry’s y coordinate.
-
entriesOf
final static List<FloatEntry> entriesOf(Pair<Number, Number> pairs)
Creates a List of FloatEntry instances. Each of the provided Pairs corresponds to a single FloatEntry, with the first element of the Pair being the FloatEntry’s x coordinate, and the second element of the Pair being the FloatEntry’s y coordinate.
Example usage:
entriesOf(0 to 1, 1 to 2, 3 to 5)The provided Number instances will be converted to Float instances.
-
entriesOf
final static List<FloatEntry> entriesOf(Number yValues)
Creates a List of FloatEntry instances out of an array of y-axis values.
The following are equivalent:
entriesOf(1, 2, 5)entriesOf(0 to 1, 1 to 2, 2 to 5)An x-axis value will be automatically assigned to each y-axis value from yValues. The x-axis value will be equal to the y-axis value’s index in yValues.
The provided Number instances will be converted to Float instances.
-
-
-
-