Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColumnSeries not displayed correctly, have bug based on different data #2211

Open
ImanGhasemiArani opened this issue Dec 17, 2024 · 0 comments
Labels
charts Charts component open Open

Comments

@ImanGhasemiArani
Copy link

ImanGhasemiArani commented Dec 17, 2024

Bug description

see test record

Steps to reproduce

see test 1 and 2 and their data.
but see test 3.

test 3 is correct, but test 1 and 2 are not correct in displaying the chart.

Code sample

Test 1 (bug)
series: [
        ColumnSeries<ChartData, double>(
          animationDuration: 1500,
          dataSource: [
            ChartData(x: 0, y: 95),
            ChartData(x: 10, y: 100),
            ChartData(x: 23, y: 93),
          ],
          xValueMapper: (data, _) => data.x.toDouble(),
          yValueMapper: (data, _) => data.y,
          width: 0.5,
          borderRadius: widget.isRounded
              ? const BorderRadius.vertical(top: Radius.circular(50))
              : BorderRadius.zero,
          color: widget.color,
          pointColorMapper: (data, _) => widget.colorResolver?.call(data),
          gradient: widget.gradient
              ? LinearGradient(
                  begin: Alignment.topCenter,
                  end: Alignment.bottomCenter,
                  colors: [
                    widget.color!,
                    widget.color!.withOpacity(0.5),
                  ],
                )
              : null,
        ),
      ],
Test 2 (bug)
          dataSource: [
            ChartData(x: 0, y: 95),
            ChartData(x: 10, y: 100),
            ChartData(x: 13, y: 93),
            ChartData(x: 23, y: 93),
          ],
         
Test 3 (expected)
          dataSource: [
            ChartData(x: 0, y: 95),
            ChartData(x: 10, y: 100),
            ChartData(x: 11, y: 93),
            ChartData(x: 23, y: 93),
          ],
         

Screenshots or Video

Screenshots test 1 (bug)

image

Screenshots test 2 (bug)

image

Screenshots test 3 (expected)

image

Stack Traces

Stack Traces
-

On which target platforms have you observed this bug?

Android

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.24.5, on Ubuntu 23.04 6.5.0-14-generic, locale
    en_US.UTF-8)
    • Flutter version 3.24.5 on channel stable at
      /home/casper/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dec2ee5c1f (5 weeks ago), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version
    36.0.0-rc1)
    • Android SDK at /home/casper/Development/Android/Sdk/
    • Platform android-35, build-tools 36.0.0-rc1
    • Java binary at: /home/casper/.jdks/jbr-17.0.9/bin/java
    • Java version OpenJDK Runtime Environment JBR-17.0.9+8-1166.2-nomod (build
      17.0.9+8-b1166.2)
    • All Android licenses accepted.

[✓] Android Studio (version 2024.2)
    • Android Studio at /opt/android-studio-2024.2.1.10-linux/android-studio
    • Flutter plugin version 82.0.3
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1)
    • IntelliJ at /opt/JetBrains.IntelliJ.IDEA.2023.3.6/idea-IU-233.15026.9
    • Flutter plugin version 79.0.3
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.96.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.102.0

[✓] Connected device (1 available)
    • SM A042F (mobile) • R83W50FKG6Y • android-arm64 • Android 14 (API 34)

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@VijayakumarMariappan VijayakumarMariappan added charts Charts component open Open labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
charts Charts component open Open
Projects
None yet
Development

No branches or pull requests

2 participants