-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
I have found out an issue with rendering pie charts.
Tested it on master 3.7.0-15.0.pre.16, ios 16.1, iphone 13 pro.
Steps to Reproduce
Sample repo available here
https://github.com/delfme/impeller-chart
Main.dart
import 'package:flutter/material.dart';
import 'package:pie_chart/pie_chart.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Pie Chart Demo',
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
HomePage({Key? key}) : super(key: key);
final dataMap = <String, double>{
"Flutter": 100,
};
final colorList = <Color>[
Colors.greenAccent,
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Impeller Chart Issue"),
),
body: Container(
padding: EdgeInsets.symmetric(horizontal: 20),
child: PieChart(
dataMap: dataMap,
chartType: ChartType.ring,
baseChartColor: Colors.grey[50]!.withOpacity(0.15),
colorList: colorList,
ringStrokeWidth: 45,
chartValuesOptions: ChartValuesOptions(
showChartValuesInPercentage: true,
),
totalValue: 100,
),
),
);
}
}
Expected results:
This is the correct rendering of the chart, there is no issue if Impeller is not enabled.
Actual results:
A portion of the circle is cut when Impeller is enabled.

Flutter doctor:
[✓] Flutter (Channel master, 3.7.0-15.0.pre.16, on macOS 12.2 21D49 darwin-arm64, locale en-IT)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability