Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabled pie chart repainting #16

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/src/chart/bar_chart/bar_chart_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -272,5 +272,6 @@ class BarChartPainter extends AxisChartPainter {
}

@override
bool shouldRepaint(CustomPainter oldDelegate) => false;
bool shouldRepaint(BarChartPainter oldDelegate) =>
oldDelegate.data != this.data;
}
3 changes: 2 additions & 1 deletion lib/src/chart/line_chart/line_chart_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -360,5 +360,6 @@ class LineChartPainter extends AxisChartPainter {
}

@override
bool shouldRepaint(CustomPainter oldDelegate) => false;
bool shouldRepaint(LineChartPainter oldDelegate) =>
oldDelegate.data != this.data;
}
4 changes: 2 additions & 2 deletions lib/src/chart/pie_chart/pie_chart_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ class PieChartPainter extends BaseChartPainter {
}

@override
bool shouldRepaint(CustomPainter oldDelegate) => false;

bool shouldRepaint(PieChartPainter oldDelegate) =>
oldDelegate.data != this.data;
}