diff --git a/lib/ui/widgets/charts/line_chart/line_chart_body.dart b/lib/ui/widgets/charts/line_chart/line_chart_body.dart index 2a5de12..ca41848 100644 --- a/lib/ui/widgets/charts/line_chart/line_chart_body.dart +++ b/lib/ui/widgets/charts/line_chart/line_chart_body.dart @@ -94,7 +94,6 @@ class _LineChartBodyState extends State { final strokeStyle = PaintStyle( strokeColor: colorScheme.onSurface.withOpacity(0.1), ); - return Chart( data: widget.data, gestureStream: _gestureStream, @@ -120,6 +119,9 @@ class _LineChartBodyState extends State { }, marks: [ LineMark( + shape: ShapeEncode(value: BasicLineShape(smooth: true)), + transition: Transition(duration: const Duration(seconds: 2)), + entrance: {MarkEntrance.x, MarkEntrance.y, MarkEntrance.opacity}, color: ColorEncode( value: colorScheme.primary, ), @@ -130,6 +132,7 @@ class _LineChartBodyState extends State { ), if (widget.showAreaElement) AreaMark( + shape: ShapeEncode(value: BasicAreaShape(smooth: true)), gradient: GradientEncode( value: LinearGradient( begin: const Alignment(0, -5), diff --git a/test/src/ui/widgets/charts/line_chart/line_chart_body_test.dart b/test/src/ui/widgets/charts/line_chart/line_chart_body_test.dart index bc69a0d..9c91e02 100644 --- a/test/src/ui/widgets/charts/line_chart/line_chart_body_test.dart +++ b/test/src/ui/widgets/charts/line_chart/line_chart_body_test.dart @@ -55,6 +55,7 @@ void main() { await tester.pumpExperience( buildSubject(onPointSelected: completer.complete), ); + await tester.pumpAndSettle(); await tester.tap(find.byType(LineChartBody)); await tester.pumpAndSettle();