Skip to content

Commit

Permalink
Override toString method for FlSpot. Allows printing of X and Y FlSpo…
Browse files Browse the repository at this point in the history
…t coordinates instead of data type(FlSpot).

- London Tran
  • Loading branch information
LondonTran committed Oct 17, 2020
1 parent 1d39257 commit 42d7d29
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/chart/base/axis_chart/axis_chart_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ class FlSpot with EquatableMixin {
);
}

///Prints x and y coordinates of FlSpot list
@override
String toString() {
return '(' + x.toString() + ', ' + y.toString() + ')';
}

/// Used for splitting lines, or maybe other concepts.
static FlSpot nullSpot = FlSpot(null, null);

Expand Down

0 comments on commit 42d7d29

Please sign in to comment.