Skip to content

Commit 39422af

Browse files
committed
style: Format dart files with dart format
1 parent df9c75f commit 39422af

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

lib/src/chart/bar_chart/bar_chart_painter.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,10 @@ class BarChartPainter extends AxisChartPainter<BarChartData> {
306306
// draw rod stack
307307
if (barRod.rodStackItems.isNotEmpty) {
308308
// Calculate scale factor to ensure minimum height for corner radius
309-
final totalHeightPixels = (
310-
getPixelY(barRod.fromY, viewSize, holder) -
311-
getPixelY(barRod.toY, viewSize, holder)
312-
).abs();
309+
final totalHeightPixels =
310+
(getPixelY(barRod.fromY, viewSize, holder) -
311+
getPixelY(barRod.toY, viewSize, holder))
312+
.abs();
313313

314314
final scaleFactor = totalHeightPixels < cornerHeight
315315
? cornerHeight / totalHeightPixels
@@ -324,7 +324,8 @@ class BarChartPainter extends AxisChartPainter<BarChartData> {
324324
// Apply scale factor only when needed
325325
if (scaleFactor > 1.0) {
326326
final basePixelY = getPixelY(barRod.fromY, viewSize, holder);
327-
stackFromY = basePixelY - (basePixelY - stackFromY) * scaleFactor;
327+
stackFromY =
328+
basePixelY - (basePixelY - stackFromY) * scaleFactor;
328329
stackToY = basePixelY - (basePixelY - stackToY) * scaleFactor;
329330
}
330331

test/chart/bar_chart/bar_chart_painter_test.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,8 @@ void main() {
16461646

16471647
// Stack items should not overlap and should be adjacent
16481648
expect(rect2.bottom, closeTo(rect1.top, tolerance),
1649-
reason: 'Stack items should be adjacent without gaps (rect2.bottom should equal rect1.top)');
1649+
reason:
1650+
'Stack items should be adjacent without gaps (rect2.bottom should equal rect1.top)');
16501651

16511652
// The combined height should equal the scaled total height (cornerHeight)
16521653
final totalScaledHeight = rect1.height + rect2.height;
@@ -1655,7 +1656,8 @@ void main() {
16551656

16561657
// Heights should be proportional to data values (1:1 ratio)
16571658
expect(rect1.height, closeTo(rect2.height, tolerance),
1658-
reason: 'Stack items with equal data heights (1) should have equal pixel heights');
1659+
reason:
1660+
'Stack items with equal data heights (1) should have equal pixel heights');
16591661
});
16601662
});
16611663

0 commit comments

Comments
 (0)