Skip to content

Commit

Permalink
Fix axisSide issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andreped committed Jan 7, 2025
1 parent 550964a commit ab8250d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/widgets/charts/chart_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,8 @@ class ChartWidget extends StatelessWidget {
);
final date = DateTime.now().add(Duration(days: value.toInt()));
final formattedDate = DateFormat('dd/MM').format(date);
return SideTitleWidget(
axisSide: meta.axisSide,
space: 8.0, // Increased space to move the labels downwards
return Padding(
padding: const EdgeInsets.only(top: 8.0), // Increased space to move the labels downwards
child: Transform.rotate(
angle: -45 * 3.1415927 / 180,
child: Text(formattedDate, style: style),
Expand All @@ -266,4 +265,4 @@ class ChartWidget extends StatelessWidget {
final formattedDate = DateFormat('dd/MM').format(date);
return 'x=$formattedDate\ny=${y.toStringAsFixed(2)}';
}
}
}

0 comments on commit ab8250d

Please sign in to comment.