Skip to content

Commit

Permalink
fixes on performance graph
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlipa91 committed Nov 13, 2023
1 parent 0584739 commit e5aad7a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lib/widgets/PlayerBottomModal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ class PerformanceGraph extends StatelessWidget {
(context.read<UserState>().getUserDetail(userId)!.lastScores ?? [])
.asMap()
.entries
.map((e) => MapEntry(e.key, double.parse(e.value.toStringAsFixed(2))))
.toList();

return Padding(
Expand All @@ -213,7 +214,9 @@ class PerformanceGraph extends StatelessWidget {
child: LineChart(
LineChartData(
borderData: FlBorderData(
show: false,
show: true,
border: Border.symmetric(
horizontal: BorderSide(color: Palette.greyLightest)),
),
titlesData: FlTitlesData(
topTitles: AxisTitles(
Expand Down Expand Up @@ -246,10 +249,23 @@ class PerformanceGraph extends StatelessWidget {
),
maxY: 5,
minY: 1,
lineTouchData: LineTouchData(
handleBuiltInTouches: true,
touchTooltipData: LineTouchTooltipData(
tooltipBgColor: Palette.greyLighter,
),
getTouchLineEnd: (a, b) => 0,
),
gridData: FlGridData(
show: true,
drawHorizontalLine: true,
drawVerticalLine: false,
getDrawingHorizontalLine: (value) {
return FlLine(
color: Palette.greyLightest,
strokeWidth: 1,
);
},
),
lineBarsData: [
LineChartBarData(
Expand Down

0 comments on commit e5aad7a

Please sign in to comment.