Skip to content

Commit

Permalink
use three points for x axis datetime label
Browse files Browse the repository at this point in the history
  • Loading branch information
julien4215 committed Mar 11, 2024
1 parent da61203 commit fd38708
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/view/user/perf_stats_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,8 @@ class _EloChartState extends State<_EloChart> {
}

Widget bottomTitlesWidget(double value, TitleMeta meta) {
if (value == _minX || value == _maxX) return const SizedBox.shrink();

return SideTitleWidget(
axisSide: meta.axisSide,
child: Text(
Expand Down Expand Up @@ -937,6 +939,7 @@ class _EloChartState extends State<_EloChart> {
showTitles: true,
reservedSize: 25,
getTitlesWidget: bottomTitlesWidget,
interval: (_maxX - _minX) / 3,
),
),
leftTitles: AxisTitles(
Expand Down

0 comments on commit fd38708

Please sign in to comment.