I want to show data from a List in a line chart. The Problem is that the width is too small. So I want that you can scroll horizontal to see everything. How to do this with the Package fl_chart?
Here is my Code, i build the spots from a List.
@override
Widget build(BuildContext context) {
return LineChart(
LineChartData(
lineBarsData: [
LineChartBarData(
spots: [
for (int i = reversedList.length - 1; i >= 0; i--)
FlSpot(i.toDouble(), reversedList[i].weight),
])
]));
}
}