Skip to content

Commit cd6cd31

Browse files
authored
Increase default date range to 1 year; change format to dd/MM (#389)
* Show past 3 months by default in visualization tab * Up to 1 year back in time * Change date format to dd/MM
1 parent aa714f5 commit cd6cd31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/tabs/visualization_tab.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ class VisualizationTabState extends State<VisualizationTab> {
275275
// Initialize the date range to the last month if not already set
276276
if (_selectedDateRange == null) {
277277
final now = DateTime.now();
278-
final lastMonth = DateTime(now.year, now.month - 1, now.day);
278+
final lastMonth = DateTime(now.year, now.month - 12, now.day);
279279
_selectedDateRange = DateTimeRange(start: lastMonth, end: now);
280280
}
281281

lib/widgets/charts/chart_widget.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class ChartWidget extends StatelessWidget {
228228
fontSize: 14, // Increased font size
229229
);
230230
final date = DateTime.now().add(Duration(days: value.toInt()));
231-
final formattedDate = DateFormat('MM/dd').format(date);
231+
final formattedDate = DateFormat('dd/MM').format(date);
232232
return SideTitleWidget(
233233
axisSide: meta.axisSide,
234234
space: 8.0, // Increased space to move the labels downwards

0 commit comments

Comments
 (0)