Skip to content

Commit

Permalink
#230 - replace decimal numbers with integers at parking's page - code…
Browse files Browse the repository at this point in the history
… cleanup
  • Loading branch information
mikolaj-jalocha committed Sep 25, 2024
1 parent 5b79bfa commit f768d7d
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions lib/features/parking_chart/widgets/chart_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,23 @@ class ChartWidget extends StatelessWidget {
maxX: chartData.maxX,
maxY: chartData.maxY(parking),
minY: 0,
lineTouchData:
LineTouchData(touchTooltipData: LineTouchTooltipData(
getTooltipItems: (touchedSpots) {
return touchedSpots.map((touchedSpot) {
final value =
touchedSpot.y.toInt(); // Convert double to int
return LineTooltipItem(
value.toString(),
TextStyle(
color: context.colorTheme.whiteSoap,
fontWeight: FontWeight.bold,
),
);
}).toList();
},
),),
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
getTooltipItems: (touchedSpots) {
return touchedSpots.map((touchedSpot) {
final value =
touchedSpot.y.toInt(); // Convert double to int
return LineTooltipItem(
value.toString(),
TextStyle(
color: context.colorTheme.whiteSoap,
fontWeight: FontWeight.bold,
),
);
}).toList();
},
),
),
),
),
),
Expand Down

0 comments on commit f768d7d

Please sign in to comment.