Skip to content

Commit

Permalink
Draw gridLines even when there is no line to show in the Line Chart, #…
Browse files Browse the repository at this point in the history
  • Loading branch information
imaNNeo committed Jun 21, 2024
1 parent f21968f commit 12f985e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## newVersion
* **BUGFIX** Fix a memory leak issue in the axis-based charts, there was a logic to calculate and cache the minX, maxX, minY and maxY properties to reduce the computation cost. But it caused some memory issues, as we don't have a quick solution for this, we disabled the caching logic for now, later we can move the calculation logic to the render objects to keep and update them only when the data is changed, #1106, #1693
* **BUGFIX** Fix showing grid lines even when there is no line to show in the LineChart, #1691

## 0.68.0
* **Improvement** (by @imaNNeo) Update LineChartSample6 to implement a way to show a tooltip on a single spot, #1620
Expand Down
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.14.3
COCOAPODS: 1.15.2
3 changes: 1 addition & 2 deletions lib/src/chart/line_chart/line_chart_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class LineChartPainter extends AxisChartPainter<LineChartData> {
PaintHolder<LineChartData> holder,
) {
final data = holder.data;
super.paint(context, canvasWrapper, holder);
if (data.lineBarsData.isEmpty) {
return;
}
Expand All @@ -80,8 +81,6 @@ class LineChartPainter extends AxisChartPainter<LineChartData> {
clipToBorder(canvasWrapper, holder);
}

super.paint(context, canvasWrapper, holder);

for (final betweenBarsData in data.betweenBarsData) {
drawBetweenBarsArea(canvasWrapper, data, betweenBarsData, holder);
}
Expand Down

0 comments on commit 12f985e

Please sign in to comment.