syncfusion / flutter-widgets

Syncfusion Flutter widgets libraries include high quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base.
1.57k stars 768 forks source link

StackedColumnSeries with different groupNames and yAxisName not working #1709

Closed DrNiels closed 6 months ago

DrNiels commented 7 months ago

Using multiple stackedColumnSeries with possibly different groupName and yAxisName, I would expect columns of different groupName to be displayed next to each other as was the case until 23.2.7. As of 24.1.41 up to the current 24.2.8 the different columns are placed at the same position and overlap.

Consider the following minimal example:

import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_charts/charts.dart';

void main() async {
  List data = [42];

  runApp(
    MaterialApp(
      home: SfCartesianChart(
        axes: [NumericAxis(name: 'SecondAxis')],
        series: [
          StackedColumnSeries(
            xValueMapper: (data, _) => 1,
            yValueMapper: (data, _) => data,
            dataSource: data,
          ),
          StackedColumnSeries(
            xValueMapper: (data, _) => 1,
            yValueMapper: (data, _) => data,
            dataSource: data,
          ),
          StackedColumnSeries(
            xValueMapper: (data, _) => 1,
            yValueMapper: (data, _) => data,
            dataSource: data,
            groupName: 'OtherGroup',
            yAxisName: 'SecondAxis',
          ),
        ],
        legend: Legend(isVisible: true),
      ),
    ),
  );
}

Screenshot with >24.1.41 (not as expected): image Screenshot with 23.2.7 (as expected): image

Output of flutter doctor:

[√] Flutter (Channel stable, 3.19.2, on Microsoft Windows [Version 10.0.19045.4046], locale de-DE)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc4)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.6)
[√] Android Studio (version 2021.2)
[√] VS Code, 64-bit edition (version 1.86.0)
[√] Connected device (3 available)
[√] Network resources

I'm currently using Flutter in Web.

PreethikaSelvam commented 7 months ago

Hi @DrNiels,

Thank you for letting us know about this issue. The issue is scheduled to be fixed in our upcoming patch release after Volume 1, 2024 Main Release. We will notify you once it has been rolled out. We appreciate your patience until then.

Regards, Preethika Selvam.

ghost commented 6 months ago

Hi @DrNiels,

We would like to let you know that the reported issue is fixed and rolled out in our patch release. We kindly request you to upgrade the syncfusion_flutter_charts package to the latest version below.

Version: https://pub.dev/packages/syncfusion_flutter_charts/versions/25.1.39+1

Root cause: X-axis dependent series alone considered with side-by-side count calculation and Y-axis dependent series are not considered with side-by-side count calculation, so side-by-side count resets to 0 instead of actual count.

If you have any further queries, please feel free to reach out to us.

Regards, Lokesh P.

DrNiels commented 6 months ago

Fix is working great, thank you!