Skip to content

Commit

Permalink
Allow to show single point line in LineChart, #1438
Browse files Browse the repository at this point in the history
  • Loading branch information
imaNNeo committed Nov 24, 2023
1 parent c911024 commit 2b7be70
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* **BUGFIX** (by @imaNNeo) Fix having negative `toY` (or positive `fromY`) in BarChart's `minY` and `maxY` calculations, #1470
* **BUGFIX** (by @bobatsar) Fix bars drawn outside of diagram
* **FEATURE** (by @k0psutin) Add dashed border to BarChartRodData, #1144
* **FEATURE** (by @imaNNeo) Allow to show single point line in LineChart, #1438

## 0.64.0
* **BUGFIX** (by @Anas35) Fix Tooltip not displaying when value from BackgroundBarChartRodData is less than zero. #1345.
Expand Down
10 changes: 8 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
PODS:
- Flutter (1.0.0)
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
Expand All @@ -8,22 +10,26 @@ PODS:

DEPENDENCIES:
- Flutter (from `Flutter`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

EXTERNAL SOURCES:
Flutter:
:path: Flutter
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

COCOAPODS: 1.13.0
COCOAPODS: 1.14.3
2 changes: 1 addition & 1 deletion example/macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7

COCOAPODS: 1.13.0
COCOAPODS: 1.14.3
4 changes: 4 additions & 0 deletions lib/src/chart/line_chart/line_chart_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ class LineChartPainter extends AxisChartPainter<LineChartData> {
final y = getPixelY(barSpots[0].y, viewSize, holder);
if (appendToPath == null) {
path.moveTo(x, y);
if (size == 1) {
path.lineTo(x, y);
}
} else {
path.lineTo(x, y);
}
Expand Down Expand Up @@ -1299,6 +1302,7 @@ class LineIndexDrawingInfo {
this.spotIndex,
this.indicatorData,
);

final LineChartBarData line;
final int lineIndex;
final FlSpot spot;
Expand Down

0 comments on commit 2b7be70

Please sign in to comment.