lineData method
Generates line chart data.
Implementation
List<Map<String, dynamic>> lineData({
int points = 20,
double startValue = 50,
double volatility = 5,
String xKey = 'x',
String yKey = 'y',
}) {
final values =
_random.randomWalk(points, start: startValue, stepSize: volatility);
return List.generate(points, (i) => {xKey: i, yKey: values[i]});
}