How to add a label on pie chart from flutter?

859 views
Skip to first unread message

Kamj Duong

unread,
Jul 25, 2018, 12:47:33 AM7/25/18
to Flutter Dev
I wanna users see more information in pie chart (example percent of data, shown in the chart below). 

My code is used show pie chart, i tried some function like displayNamelabelAccessorFn in charts.Series but seem label still down show for me.

  @override
  Widget build(BuildContext context) {
    return new charts.PieChart(seriesList,
        animate: animate,
        defaultRenderer: new charts.ArcRendererConfig(arcWidth: 60));
  }

  new charts.Series<LinearSales, int>(
    id: 'Sales',
    domainFn: (LinearSales sales, _) => sales.year,
    measureFn: (LinearSales sales, _) => sales.sales,
    data: data,
  )

Sigurd Meldgaard

unread,
Jul 25, 2018, 3:35:27 AM7/25/18
to thuyd...@gmail.com, flutt...@googlegroups.com
I don't think that the drawing code for pie is drawing any text: https://github.com/google/charts/blob/master/charts_flutter/lib/src/canvas/pie_painter.dart.
It might call for a new issue, or it can be a comment in: https://github.com/google/charts/issues/66

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages