Pie chart using charts_flutter package

292 views
Skip to first unread message

App Testing

unread,
Oct 10, 2020, 4:39:51 AM10/10/20
to Flutter Development (flutter-dev)
I would like to use create a pie chart to display the following data with labels. I'm not sure how to use the below code. I will appreciate if you can share any example with me.


Data:
iOS
10 

Linux
12

Android
14

Windows
16

Others
18 



Suzuki Tomohiro

unread,
Oct 10, 2020, 9:29:22 AM10/10/20
to Flutter Development (flutter-dev)
The website is the example code. Which part do you have difficulty with?

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/da5c81fe-e491-4856-9e65-a74eaa64e41cn%40googlegroups.com.

Suzuki Tomohiro

unread,
Oct 10, 2020, 1:20:51 PM10/10/20
to Flutter Development (flutter-dev)
When you read the example 

On Sat, Oct 10, 2020 at 12:25 App Testing <fluttera...@gmail.com> wrote:
I have to prepare a pie chart using this data. It can be simple or outside labels or donuts but with percentage and labels.
I'm not sure how to do that.

Data:
iOS 10 
Linux
12

Android
14

Windows
16

Others 18

Here's an example.

image.png



You received this message because you are subscribed to a topic in the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flutter-dev/W4E4FBsD9Zo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/CAHWORbrpg7ZZ430mxZ-7sxQLtJAWqCcnNqpxqf9zkSJD6gSk-A%40mail.gmail.com.

App Testing

unread,
Oct 11, 2020, 6:11:19 PM10/11/20
to Flutter Development (flutter-dev)
Mr Suzuki Tomohiro
Your messages are not helping. So here' my request to you:
a) If you have any example that I can copy and paste in Android Studio and it can generate the pie chart, please share it here if you can
b) If you don't have any example or you can't share, I will request you not to respond to this thread again so others who like to help the community can help me.

Thanks for the understanding.

Here's the problem again for your reference:
I would like to create a pie chart to display the following data with labels. I'm not sure how to use the below code. I will appreciate if someone can share any working example with me that I can copy and paste and it would generate a pie chart with labels.


Data:
iOS
10 

Linux
12

Android
14

Windows
16

Others
18 


Regards,
A flutter learner
------------------------------------------------


Try copying and pasting the code from https://google.github.io/charts/flutter/example/pie_charts/auto_label, and run it as it is, and send me the screen

Suzuki Tomohiro

unread,
Oct 11, 2020, 6:43:00 PM10/11/20
to Flutter Development (flutter-dev)
Sure. I stop responding to you. Good luck.

Darkhorse M

unread,
Oct 15, 2020, 12:22:03 PM10/15/20
to Flutter Development (flutter-dev)
image.png
everyone. I am learning flutter, and I am creating the simple flutter application. I tried to add line chart equivalent this, but I can't find the chart package for this one. How can I create this chart?  

App Testing

unread,
Oct 15, 2020, 3:40:50 PM10/15/20
to Flutter Development (flutter-dev)
Here's the link to the chart package: https://pub.dev/packages/charts_flutter
Link https://google.github.io/charts/flutter/gallery.html has examples for many nice looking charts that use the above package including line chart, but the examples do not have the full code. Most of these charts expects the value for these two parameters.

1)  final List<charts.Series> seriesList;
 2) final bool animate;

If you figure out how to call these packages, please share the code with the group so others can be benefited. I will do the same. If anyone has used charts_flutter, I will appreciate if they can share the code that call these packages.



Reply all
Reply to author
Forward
0 new messages