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

SfCircularChart DoughnutSeries with pointRadiusMapper #2185

Open
aike1202 opened this issue Nov 26, 2024 · 0 comments
Open

SfCircularChart DoughnutSeries with pointRadiusMapper #2185

aike1202 opened this issue Nov 26, 2024 · 0 comments
Labels
charts Charts component open Open

Comments

@aike1202
Copy link

Bug description

when i use SfCircularChart with DoughnutSeries and set pointRadiusMapper it appear like this
image
I was looking forward to this
image

Steps to reproduce

SfCircularChart
DoughnutSeries
pointRadiusMapper

Code sample

Code sample
  final List<ChartData> chartData = [
    ChartData('David', 20, Color.fromRGBO(182, 177, 238, 1.0), "20%"),
    ChartData('Steve', 5, Color.fromRGBO(147, 0, 119, 1), "5%"),
    ChartData('Jack', 45, Color.fromRGBO(228, 0, 124, 1), "45%"),
    ChartData('Others', 30, Color.fromRGBO(255, 189, 57, 1), "30%"),
  ];

class ChartData {
  ChartData(this.x, this.y, this.color, this.size);

  final String x;
  final double y;
  final Color color;
  final String size;
}
SfCircularChart(series: <CircularSeries>[
                      // Renders doughnut chart
                      DoughnutSeries<ChartData, String>(
                        dataSource: chartData,
                        pointColorMapper: (ChartData data, _) => data.color,
                        xValueMapper: (ChartData data, _) => data.x,
                        yValueMapper: (ChartData data, _) => data.y,
                        pointRadiusMapper: (ChartData data, _) => data.size,
                        dataLabelSettings: const DataLabelSettings(
                            alignment: ChartAlignment.center,
                            isVisible: true,
                            connectorLineSettings: ConnectorLineSettings(
                              type: ConnectorType.line,
                              length: '15%',
                              width: 2,
                              color: Colors.white,
                            ),
                            labelPosition: ChartDataLabelPosition.outside,
                            textStyle: TextStyle(color: Colors.white)),
                      )
                    ])


Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Stack Traces

Stack Traces
[Add the Stack Traces here]

On which target platforms have you observed this bug?

Web, Windows

Flutter Doctor output

Doctor output
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel stable, 3.24.4, on Microsoft Windows [版本 10.0.22631.4460], locale zh-CN)
    • Flutter version 3.24.4 on channel stable at D:\tools\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 603104015d (5 weeks ago), 2024-10-24 08:01:25 -0700
    • Engine revision db49896cf2
    • Dart version 3.5.4
    • DevTools version 2.37.3
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Windows Version (Installed version of Windows is version 10 or higher)

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/to/windows-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.5)
    • Visual Studio at D:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.11.35327.3
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2024.1)
    • Android Studio at D:\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 17.0.11+0--11852314)

[√] IntelliJ IDEA Ultimate Edition (version 2024.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.7
    • 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

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [版本 10.0.22631.4460]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 131.0.6778.86
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 131.0.2903.63

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

! Doctor found issues in 1 category.
@VijayakumarMariappan VijayakumarMariappan added charts Charts component open Open labels Nov 27, 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