Repository: imaNNeo/fl_chart (dart)

Issue:
Add Text Inside Bar to Bar Chart
Is it possible to have text inside the bar in the stacked bar chart, like the image?
My requirement at work is to have text inside the bar and show the total value of the column when the user clicks or taps.
FL Chart already shows the total value when the user click or tap. I haven't found a way to do this with version [v0.20.1](https://pub.dev/packages/fl_chart/versions/0.20.1).

![Image Example](https://user-images.githubusercontent.com/41541500/110689237-3b63ce80-81c1-11eb-95b4-22041d00c5fe.png)

Pull request description:
![Screenshot (4)](https://github.com/user-attachments/assets/eda0321c-70d9-402c-8303-fe3567286c51)

added text and text style for barchart in rodstackitem you can see it in sample 4 and 5

Fixes #598

Patch:
diff --git a/example/lib/presentation/samples/bar/bar_chart_sample5.dart b/example/lib/presentation/samples/bar/bar_chart_sample5.dart
index 8603c546b..a0f73df81 100644
--- a/example/lib/presentation/samples/bar/bar_chart_sample5.dart
+++ b/example/lib/presentation/samples/bar/bar_chart_sample5.dart
@@ -170,7 +170,8 @@ class BarChartSample5State extends State<BarChartSample5> {
               0,
               value1,
               AppColors.contentColorGreen,
-              BorderSide(
+              label: isTouched ? 'A' : null,
+              borderSide: BorderSide(
                 color: Colors.white,
                 width: isTouched ? 2 : 0,
               ),
@@ -179,7 +180,8 @@ class BarChartSample5State extends State<BarChartSample5> {
               value1,
               value1 + value2,
               AppColors.contentColorYellow,
-              BorderSide(
+              label: isTouched ? 'B' : null,
+              borderSide: BorderSide(
                 color: Colors.white,
                 width: isTouched ? 2 : 0,
               ),
@@ -188,7 +190,8 @@ class BarChartSample5State extends State<BarChartSample5> {
               value1 + value2,
               value1 + value2 + value3,
               AppColors.contentColorPink,
-              BorderSide(
+              label: isTouched ? 'C' : null,
+              borderSide: BorderSide(
                 color: Colors.white,
                 width: isTouched ? 2 : 0,
               ),
@@ -197,7 +200,8 @@ class BarChartSample5State extends State<BarChartSample5> {
               value1 + value2 + value3,
               value1 + value2 + value3 + value4,
               AppColors.contentColorBlue,
-              BorderSide(
+              label: isTouched ? 'D' : null,
+              borderSide: BorderSide(
                 color: Colors.white,
                 width: isTouched ? 2 : 0,
               ),
@@ -223,28 +227,32 @@ class BarChartSample5State extends State<BarChartSample5> {
               -value1,
               AppColors.contentColorGreen.withValues(
                   alpha: isTouched ? shadowOpacity * 2 : shadowOpacity),
-              const BorderSide(color: Colors.transparent),
+              label: isTouched ? 'A' : null,
+              borderSide: const BorderSide(color: Colors.transparent),
             ),
             BarChartRodStackItem(
               -value1,
               -(value1 + value2),
               AppColors.contentColorYellow.withValues(
                   alpha: isTouched ? shadowOpacity * 2 : shadowOpacity),
-              const BorderSide(color: Colors.transparent),
+              label: isTouched ? 'B' : null,
+              borderSide: const BorderSide(color: Colors.transparent),
             ),
             BarChartRodStackItem(
               -(value1 + value2),
               -(value1 + value2 + value3),
               AppColors.contentColorPink.withValues(
                   alpha: isTouched ? shadowOpacity * 2 : shadowOpacity),
-              const BorderSide(color: Colors.transparent),
+              label: isTouched ? 'C' : null,
+              borderSide: const BorderSide(color: Colors.transparent),
             ),
             BarChartRodStackItem(
               -(value1 + value2 + value3),
               -(value1 + value2 + value3 + value4),
               AppColors.contentColorBlue.withValues(
                   alpha: isTouched ? shadowOpacity * 2 : shadowOpacity),
-              const BorderSide(color: Colors.transparent),
+              label: isTouched ? 'D' : null,
+              borderSide: const BorderSide(color: Colors.transparent),
             ),
           ],
         ),
diff --git a/lib/src/chart/bar_chart/bar_chart_data.dart b/lib/src/chart/bar_chart/bar_chart_data.dart
index 82e875244..78b711b21 100644
--- a/lib/src/chart/bar_chart/bar_chart_data.dart
+++ b/lib/src/chart/bar_chart/bar_chart_data.dart
@@ -487,9 +487,13 @@ class BarChartRodStackItem with EquatableMixin {
   BarChartRodStackItem(
     this.fromY,
     this.toY,
-    this.color, [
+    this.color, {
+    this.label,
+    this.labelStyle,
     this.borderSide = Utils.defaultBorderSide,
-  ]);
+  });
+  final String? label;
+  final TextStyle? labelStyle;
 
   /// Renders a Stacked Chart section from [fromY]
   final double fromY;
@@ -509,13 +513,17 @@ class BarChartRodStackItem with EquatableMixin {
     double? fromY,
     double? toY,
     Color? color,
+    String? label,
+    TextStyle? labelStyle,
     BorderSide? borderSide,
   }) =>
       BarChartRodStackItem(
         fromY ?? this.fromY,
         toY ?? this.toY,
         color ?? this.color,
-        borderSide ?? this.borderSide,
+        label: label ?? this.label,
+        labelStyle: labelStyle ?? this.labelStyle,
+        borderSide: borderSide ?? this.borderSide,
       );
 
   /// Lerps a [BarChartRodStackItem] based on [t] value, check [Tween.lerp].
@@ -528,12 +536,14 @@ class BarChartRodStackItem with EquatableMixin {
         lerpDouble(a.fromY, b.fromY, t)!,
         lerpDouble(a.toY, b.toY, t)!,
         Color.lerp(a.color, b.color, t)!,
-        BorderSide.lerp(a.borderSide, b.borderSide, t),
+        label: b.label,
+        labelStyle: b.labelStyle,
+        borderSide: BorderSide.lerp(a.borderSide, b.borderSide, t),
       );
 
   /// Used for equality check, see [EquatableMixin].
   @override
-  List<Object?> get props => [fromY, toY, color, borderSide];
+  List<Object?> get props => [fromY, toY, color, label, labelStyle, borderSide];
 }
 
 /// Holds values to draw a rod in rear of the main rod.
@@ -713,7 +723,10 @@ class BarTouchTooltipData with EquatableMixin {
   /// [BarChart] shows a tooltip popup on top of rods automatically when touch happens,
   /// otherwise you can show it manually using [BarChartGroupData.showingTooltipIndicators].
   /// Tooltip shows on top of rods, with [getTooltipColor] as a background color.
-  /// You can set the corner radius using [tooltipBorderRadius],
+  /// You can set the corner radius using [tooltipRoundedRadius],
+  /// or if you need a custom border, you can use [tooltipBorderRadius].
+  /// Note that if both [tooltipRoundedRadius] and [tooltipBorderRadius] are set,
+  /// the value from [tooltipBorderRadius] will be used.
   /// If you want to have a padding inside the tooltip, fill [tooltipPadding],
   /// or If you want to have a bottom margin, set [tooltipMargin].
   /// Content of the tooltip will provide using [getTooltipItem] callback, you can override it
diff --git a/lib/src/chart/bar_chart/bar_chart_painter.dart b/lib/src/chart/bar_chart/bar_chart_painter.dart
index 592023071..1e7b91e66 100644
--- a/lib/src/chart/bar_chart/bar_chart_painter.dart
+++ b/lib/src/chart/bar_chart/bar_chart_painter.dart
@@ -320,6 +320,43 @@ class BarChartPainter extends AxisChartPainter<BarChartData> {
                 ..clipRect(rect)
                 ..drawRRect(barRRect, _barPaint)
                 ..restore();
+              if (stackItem.label != null) {
+                final textStyle = stackItem.labelStyle ??
+                    const TextStyle(
+                      color: Colors.white,
+                      fontSize: 12,
+                      fontWeight: FontWeight.bold,
+                    );
+
+                final labelText = stackItem.label!;
+                final textSpan = TextSpan(text: labelText, style: textStyle);
+                final textPainter = TextPainter(
+                  text: textSpan,
+                  textAlign: TextAlign.center,
+                  textDirection: TextDirection.ltr,
+                  textScaler: holder.textScaler,
+                )..layout();
+
+                // Calculate rotation
+                final rotation = -holder.data.rotationQuarterTurns * (pi / 2);
+                final centerX = x;
+                final centerY = (stackFromY + stackToY) / 2;
+
+                // Check if text fits vertically
+                final segmentHeight = (stackFromY - stackToY).abs();
+                if (textPainter.height < segmentHeight) {
+                  canvasWrapper
+                    ..save()
+                    ..translate(centerX, centerY)
+                    ..rotate(rotation)
+                    ..translate(
+                      -textPainter.width / 2,
+                      -textPainter.height / 2,
+                    );
+                  textPainter.paint(canvasWrapper.canvas, Offset.zero);
+                  canvasWrapper.restore();
+                }
+              }
 
               // draw border stroke for each stack item
               drawStackItemBorderStroke(
diff --git a/repo_files/documentations/bar_chart.md b/repo_files/documentations/bar_chart.md
index d7fe677e7..2902833ec 100644
--- a/repo_files/documentations/bar_chart.md
+++ b/repo_files/documentations/bar_chart.md
@@ -77,6 +77,8 @@ enum values {`start`, `end`, `center`, `spaceEvenly`, `spaceAround`, `spaceBetwe
 |fromY|draw stack item from this value|null|
 |toY|draw stack item to this value|null|
 |color|color of the stack item|null|
+|label|optional text label for the stack item|null|
+|labelStyle|optional TextStyle for the label|null|
 |borderSide|draw border stroke for each stack item|null|
 
 ### BarTouchData ([read about touch handling](handle_touches.md))


Test patch:
diff --git a/test/chart/bar_chart/bar_chart_data_test.dart b/test/chart/bar_chart/bar_chart_data_test.dart
index 28921d979..710ae625b 100644
--- a/test/chart/bar_chart/bar_chart_data_test.dart
+++ b/test/chart/bar_chart/bar_chart_data_test.dart
@@ -54,6 +54,8 @@ void main() {
         true,
       );
       expect(barChartRodStackItem1 == barChartRodStackItem2, false);
+      expect(barChartRodStackItem1 == barChartRodStackItem3, false);
+      expect(barChartRodStackItem2 == barChartRodStackItem4, false);
     });
 
     test('BackgroundBarChartRodData equality test', () {
diff --git a/test/chart/bar_chart/bar_chart_painter_test.dart b/test/chart/bar_chart/bar_chart_painter_test.dart
index c3595ba45..f645ad4ac 100644
--- a/test/chart/bar_chart/bar_chart_painter_test.dart
+++ b/test/chart/bar_chart/bar_chart_painter_test.dart
@@ -1256,10 +1256,30 @@ void main() {
               toY: 10,
               color: const Color(0x00000000),
               rodStackItems: [
-                BarChartRodStackItem(-5, -10, const Color(0x11111111)),
-                BarChartRodStackItem(0, -5, const Color(0x22222222)),
-                BarChartRodStackItem(0, 5, const Color(0x33333333)),
-                BarChartRodStackItem(5, 10, const Color(0x44444444)),
+                BarChartRodStackItem(
+                  -5,
+                  -10,
+                  const Color(0x11111111),
+                  label: '5',
+                ),
+                BarChartRodStackItem(
+                  0,
+                  -5,
+                  const Color(0x22222222),
+                  label: '5',
+                ),
+                BarChartRodStackItem(
+                  0,
+                  5,
+                  const Color(0x33333333),
+                  label: '5',
+                ),
+                BarChartRodStackItem(
+                  5,
+                  10,
+                  const Color(0x44444444),
+                  label: '5',
+                ),
               ],
             ),
           ],
@@ -1524,6 +1544,251 @@ void main() {
     });
   });
 
+  group('drawBars() - label tests', () {
+    late MockUtils mockUtils;
+    final utilsMainInstance = Utils();
+
+    setUp(() {
+      mockUtils = MockUtils();
+      Utils.changeInstance(mockUtils);
+      when(mockUtils.getThemeAwareTextStyle(any, any))
+          .thenAnswer((realInvocation) => textStyle1);
+      when(mockUtils.calculateRotationOffset(any, any))
+          .thenAnswer((realInvocation) => Offset.zero);
+      when(mockUtils.convertRadiusToSigma(any))
+          .thenAnswer((realInvocation) => 4.0);
+      when(mockUtils.getEfficientInterval(any, any))
+          .thenAnswer((realInvocation) => 1.0);
+      when(mockUtils.getBestInitialIntervalValue(any, any, any))
+          .thenAnswer((realInvocation) => 1.0);
+      when(mockUtils.normalizeBorderRadius(any, any))
+          .thenAnswer((realInvocation) => BorderRadius.zero);
+      when(mockUtils.normalizeBorderSide(any, any)).thenAnswer(
+        (realInvocation) => const BorderSide(color: MockData.color0),
+      );
+    });
+
+    tearDown(() {
+      Utils.changeInstance(utilsMainInstance);
+    });
+
+    test('should render simple stack item labels', () {
+      const viewSize = Size(200, 100);
+
+      final barGroups = [
+        BarChartGroupData(
+          x: 0,
+          barRods: [
+            BarChartRodData(
+              toY: 10,
+              width: 20,
+              color: Colors.transparent,
+              rodStackItems: [
+                BarChartRodStackItem(
+                  0,
+                  5,
+                  Colors.red,
+                  label: 'Label 1',
+                  labelStyle: const TextStyle(fontSize: 15),
+                ),
+                BarChartRodStackItem(
+                  5,
+                  10,
+                  Colors.blue,
+                  label: 'Label 2',
+                ),
+              ],
+            ),
+          ],
+        ),
+      ];
+
+      final data = BarChartData(
+        titlesData: const FlTitlesData(show: false),
+        barGroups: barGroups,
+        minY: 0,
+        maxY: 10,
+      );
+
+      final barChartPainter = BarChartPainter();
+      final holder =
+          PaintHolder<BarChartData>(data, data, TextScaler.noScaling);
+
+      final mockCanvas = MockCanvas();
+      final mockCanvasWrapper = MockCanvasWrapper();
+      when(mockCanvasWrapper.size).thenAnswer((realInvocation) => viewSize);
+      when(mockCanvasWrapper.canvas).thenReturn(mockCanvas);
+      when(mockCanvasWrapper.save()).thenReturn(null);
+      when(mockCanvasWrapper.restore()).thenReturn(null);
+      when(mockCanvasWrapper.translate(any, any)).thenReturn(null);
+      when(mockCanvasWrapper.rotate(any)).thenReturn(null);
+      when(mockCanvasWrapper.drawRRect(any, any)).thenReturn(null);
+
+      final paragraphs = <Map<String, dynamic>>[];
+      when(mockCanvas.drawParagraph(captureAny, captureAny)).thenAnswer((inv) {
+        final paragraph = inv.positionalArguments[0];
+        final offset = inv.positionalArguments[1] as Offset;
+        paragraphs.add({
+          'paragraph': paragraph,
+          'offset': offset,
+        });
+        return;
+      });
+
+      final groupsX = data.calculateGroupsX(viewSize.width);
+      final barGroupsPosition = barChartPainter.calculateGroupAndBarsPosition(
+        viewSize,
+        groupsX,
+        barGroups,
+      );
+
+      barChartPainter.drawBars(mockCanvasWrapper, barGroupsPosition, holder);
+
+      expect(paragraphs.length, 2, reason: 'Should have drawn 2 labels');
+    });
+
+    test('should render long stack item labels', () {
+      const viewSize = Size(200, 100);
+
+      final barGroups = [
+        BarChartGroupData(
+          x: 0,
+          barRods: [
+            BarChartRodData(
+              toY: 10,
+              width: 20,
+              color: Colors.transparent,
+              rodStackItems: [
+                BarChartRodStackItem(
+                  0,
+                  5,
+                  Colors.red,
+                  label: 'This is a very long label that might not fit',
+                  labelStyle: const TextStyle(fontSize: 12),
+                ),
+              ],
+            ),
+          ],
+        ),
+      ];
+
+      final data = BarChartData(
+        titlesData: const FlTitlesData(show: false),
+        barGroups: barGroups,
+        minY: 0,
+        maxY: 10,
+      );
+
+      final barChartPainter = BarChartPainter();
+      final holder =
+          PaintHolder<BarChartData>(data, data, TextScaler.noScaling);
+
+      final mockCanvas = MockCanvas();
+      final mockCanvasWrapper = MockCanvasWrapper();
+      when(mockCanvasWrapper.size).thenAnswer((realInvocation) => viewSize);
+      when(mockCanvasWrapper.canvas).thenReturn(mockCanvas);
+      when(mockCanvasWrapper.save()).thenReturn(null);
+      when(mockCanvasWrapper.restore()).thenReturn(null);
+      when(mockCanvasWrapper.translate(any, any)).thenReturn(null);
+      when(mockCanvasWrapper.rotate(any)).thenReturn(null);
+      when(mockCanvasWrapper.drawRRect(any, any)).thenReturn(null);
+
+      final paragraphs = <Map<String, dynamic>>[];
+      when(mockCanvas.drawParagraph(captureAny, captureAny)).thenAnswer((inv) {
+        final paragraph = inv.positionalArguments[0];
+        final offset = inv.positionalArguments[1] as Offset;
+        paragraphs.add({
+          'paragraph': paragraph,
+          'offset': offset,
+        });
+        return;
+      });
+
+      final groupsX = data.calculateGroupsX(viewSize.width);
+      final barGroupsPosition = barChartPainter.calculateGroupAndBarsPosition(
+        viewSize,
+        groupsX,
+        barGroups,
+      );
+
+      barChartPainter.drawBars(mockCanvasWrapper, barGroupsPosition, holder);
+
+      expect(paragraphs.length, 1, reason: 'Should have drawn 1 long label');
+    });
+
+    test('should render labels with special characters and emojis', () {
+      const viewSize = Size(200, 100);
+
+      final barGroups = [
+        BarChartGroupData(
+          x: 0,
+          barRods: [
+            BarChartRodData(
+              toY: 10,
+              width: 20,
+              color: Colors.transparent,
+              rodStackItems: [
+                BarChartRodStackItem(
+                  0,
+                  10,
+                  Colors.purple,
+                  label: 'Label with emojis 🎯 & symbols!',
+                  labelStyle: const TextStyle(fontWeight: FontWeight.bold),
+                ),
+              ],
+            ),
+          ],
+        ),
+      ];
+
+      final data = BarChartData(
+        titlesData: const FlTitlesData(show: false),
+        barGroups: barGroups,
+        minY: 0,
+        maxY: 10,
+      );
+
+      final barChartPainter = BarChartPainter();
+      final holder =
+          PaintHolder<BarChartData>(data, data, TextScaler.noScaling);
+
+      final mockCanvas = MockCanvas();
+      final mockCanvasWrapper = MockCanvasWrapper();
+      when(mockCanvasWrapper.size).thenAnswer((realInvocation) => viewSize);
+      when(mockCanvasWrapper.canvas).thenReturn(mockCanvas);
+      when(mockCanvasWrapper.save()).thenReturn(null);
+      when(mockCanvasWrapper.restore()).thenReturn(null);
+      when(mockCanvasWrapper.translate(any, any)).thenReturn(null);
+      when(mockCanvasWrapper.rotate(any)).thenReturn(null);
+      when(mockCanvasWrapper.drawRRect(any, any)).thenReturn(null);
+
+      final paragraphs = <Map<String, dynamic>>[];
+      when(mockCanvas.drawParagraph(captureAny, captureAny)).thenAnswer((inv) {
+        final paragraph = inv.positionalArguments[0];
+        final offset = inv.positionalArguments[1] as Offset;
+        paragraphs.add({
+          'paragraph': paragraph,
+          'offset': offset,
+        });
+        return;
+      });
+
+      final groupsX = data.calculateGroupsX(viewSize.width);
+      final barGroupsPosition = barChartPainter.calculateGroupAndBarsPosition(
+        viewSize,
+        groupsX,
+        barGroups,
+      );
+
+      barChartPainter.drawBars(mockCanvasWrapper, barGroupsPosition, holder);
+
+      expect(
+        paragraphs.length,
+        1,
+        reason: 'Should have drawn 1 label with special characters',
+      );
+    });
+  });
   group('drawTouchTooltip()', () {
     test('test 1', () {
       final mockUtils = MockUtils();
@@ -2103,19 +2368,22 @@ void main() {
           0,
           3,
           const Color(0x11111110),
-          const BorderSide(color: Color(0x11111111)),
+          label: '5',
+          borderSide: const BorderSide(color: Color(0x11111111)),
         ),
         BarChartRodStackItem(
           3,
           8,
           const Color(0x22222220),
-          const BorderSide(color: Color(0x22222221), width: 2),
+          label: '5',
+          borderSide: const BorderSide(color: Color(0x22222221), width: 2),
         ),
         BarChartRodStackItem(
           8,
           10,
           const Color(0x33333330),
-          const BorderSide(color: Color(0x33333331), width: 3),
+          label: '5',
+          borderSide: const BorderSide(color: Color(0x33333331), width: 3),
         ),
       ];
 
@@ -2402,7 +2670,12 @@ void main() {
               color: const Color(0x00000000),
               borderRadius: const BorderRadius.all(Radius.circular(0.1)),
               rodStackItems: [
-                BarChartRodStackItem(0, 5, const Color(0xFF0F0F0F)),
+                BarChartRodStackItem(
+                  0,
+                  5,
+                  const Color(0xFF0F0F0F),
+                  label: '5',
+                ),
               ],
             ),
           ],
diff --git a/test/chart/data_pool.dart b/test/chart/data_pool.dart
index a0ba7d251..1ee155546 100644
--- a/test/chart/data_pool.dart
+++ b/test/chart/data_pool.dart
@@ -2452,6 +2452,12 @@ final BarChartRodStackItem barChartRodStackItem1 = BarChartRodStackItem(
   1,
   2,
   Colors.green,
+  label: 'Test Label',
+  labelStyle: const TextStyle(
+    color: Colors.white,
+    fontSize: 14,
+    fontWeight: FontWeight.bold,
+  ),
 );
 final BarChartRodStackItem barChartRodStackItem1Clone =
     barChartRodStackItem1.copyWith();
@@ -2462,6 +2468,22 @@ final BarChartRodStackItem barChartRodStackItem2 = BarChartRodStackItem(
   Colors.green,
 );
 
+final BarChartRodStackItem barChartRodStackItem3 = BarChartRodStackItem(
+  3,
+  4,
+  Colors.green,
+  label: 'This is a very long label that might not fit',
+  labelStyle: const TextStyle(fontSize: 12),
+);
+
+final BarChartRodStackItem barChartRodStackItem4 = BarChartRodStackItem(
+  8,
+  10,
+  Colors.purple,
+  label: 'Label with emojis 🎯 & symbols!',
+  labelStyle: const TextStyle(fontWeight: FontWeight.bold),
+);
+
 final BackgroundBarChartRodData backgroundBarChartRodData1 =
     BackgroundBarChartRodData(
   toY: 21,
@@ -2495,6 +2517,8 @@ final BarChartRodData barChartRodData1 = BarChartRodData(
   rodStackItems: [
     barChartRodStackItem1,
     barChartRodStackItem2,
+    barChartRodStackItem3,
+    barChartRodStackItem4,
   ],
   backDrawRodData: backgroundBarChartRodData1,
 );
@@ -2503,6 +2527,8 @@ final BarChartRodData barChartRodData1Clone = barChartRodData1.copyWith(
   rodStackItems: [
     barChartRodStackItem1Clone,
     barChartRodStackItem2,
+    barChartRodStackItem3,
+    barChartRodStackItem4,
   ],
 );
 
@@ -2514,6 +2540,8 @@ final BarChartRodData barChartRodData2 = BarChartRodData(
   rodStackItems: [
     barChartRodStackItem1,
     barChartRodStackItem2,
+    barChartRodStackItem3,
+    barChartRodStackItem4,
   ],
   backDrawRodData: backgroundBarChartRodData1,
 );
@@ -2535,6 +2563,8 @@ final BarChartRodData barChartRodData4 = BarChartRodData(
   rodStackItems: [
     barChartRodStackItem2,
     barChartRodStackItem1,
+    barChartRodStackItem4,
+    barChartRodStackItem3,
   ],
   backDrawRodData: backgroundBarChartRodData1,
 );
@@ -2546,6 +2576,8 @@ final BarChartRodData barChartRodData5 = BarChartRodData(
   rodStackItems: [
     barChartRodStackItem1,
     barChartRodStackItem2,
+    barChartRodStackItem4,
+    barChartRodStackItem3,
   ],
   backDrawRodData: backgroundBarChartRodData1,
 );
@@ -2564,6 +2596,8 @@ final BarChartRodData barChartRodData7 = BarChartRodData(
   rodStackItems: [
     barChartRodStackItem1,
     barChartRodStackItem2,
+    barChartRodStackItem4,
+    barChartRodStackItem3,
   ],
   backDrawRodData: backgroundBarChartRodData2,
 );
@@ -2575,6 +2609,8 @@ final BarChartRodData barChartRodData8 = BarChartRodData(
   rodStackItems: [
     barChartRodStackItem1,
     barChartRodStackItem2,
+    barChartRodStackItem4,
+    barChartRodStackItem3,
   ],
   backDrawRodData: backgroundBarChartRodData1,
 );