Closed DrNiels closed 5 days ago
Hi @DrNiels,
We can replicate the reported issue. This issue is scheduled to be fixed in our upcoming weekly release which is scheduled on April 30, 2024. We will update you here once the release is rolled out and we appreciate your patience until then.
Regards,
Preethika Selvam.
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.42+1
Root cause: Y values lists are cleared instead of stacked values lists while dynamically update data points.
If you have any further queries, please feel free to reach out to us.
Regards,
Preethika Selvam.
Seems to work as intended, thank you for the fix!
Bug description
While adding values to a StackedColumnSeries and confirming them via controller.updateDataSource, sometimes an error is thrown. I could not observe when it does and when it does not, but the following example throws them a lot. I use the version 25.1.40 of syncfusion_flutter_charts.
Steps to reproduce
Load the code sample and pan to the left.
Code sample
Code sample
```dart import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_charts/charts.dart'; void main() async { runApp( MaterialApp( home: TestChart(), ), ); } class TestChart extends StatefulWidget { _TestChartState createState() => _TestChartState(); } class _TestChartState extends StateScreenshots or Video
In the code sample, the error does not become visible in the UI, but it can definitely affect other examples as the callback is ended due to a thrown error.
Stack Traces
Stack Traces
```dart ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════ The following IndexError was thrown during a scheduler callback: RangeError (index): Index out of range: no indices are valid: 0 When the exception was thrown, this was the stack: dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3 throw_ dart-sdk/lib/_internal/js_dev_runtime/private/js_array.dart 600:7 _get] packages/syncfusion_flutter_charts/src/charts/series/chart_series.dart 6129:33 [_computeStackedValues] packages/syncfusion_flutter_charts/src/charts/series/chart_series.dart 6068:7 [_calculateStackingValues] packages/syncfusion_flutter_charts/src/charts/series/chart_series.dart 6398:5 updateDataPoints packages/syncfusion_flutter_charts/src/charts/series/chart_series.dart 2693:15 updateDataSource reproduce.dart 84:19 updateData reproduce.dart 61:13On which target platforms have you observed this bug?
Web
Flutter Doctor output
Doctor output
```console [√] Flutter (Channel stable, 3.19.5, on Microsoft Windows [Version 10.0.19045.4291], locale de-DE) • Flutter version 3.19.5 on channel stable at C:\Users\Niels\Documents\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 300451adae (3 weeks ago), 2024-03-27 21:54:07 -0500 • Engine revision e76c956498 • Dart version 3.3.3 • DevTools version 2.31.1 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc4) • Android SDK at C:\Users\Niels\AppData\Local\Android\Sdk • Platform android-34, build-tools 34.0.0-rc4 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Users\Niels\AppData\Local\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.6) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.8.34525.116 • Windows 10 SDK version 10.0.19041.0 [√] Android Studio (version 2021.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) [√] VS Code, 64-bit edition (version 1.87.2) • VS Code at C:\Program Files\Microsoft VS Code • Flutter extension version 3.86.0 [√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.4291] • Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.123 • Edge (web) • edge • web-javascript • Microsoft Edge 123.0.2420.97 [√] Network resources • All expected network resources are available. • No issues found! ```