ChartPie.withChartData constructor

ChartPie.withChartData(
  1. List data, {
  2. bool animate = false,
  3. double height = 200.0,
  4. int titleFontSize = 14,
  5. int arcWidth = 40,
  6. double maskFontSize = 18.0,
  7. bool showLegend = true,
  8. bool showChartTitle = true,
  9. Widget? loadingWidget,
})

Implementation

factory ChartPie.withChartData(List data,
    {bool animate = false,
    double height = 200.0,
    int titleFontSize = 14,
    int arcWidth = 40,
    double maskFontSize = 18.0,
    bool showLegend = true,
    bool showChartTitle = true,
    Widget? loadingWidget}) {
  var lineData =
      data.map<ChartLineData>((e) => ChartLineData.fromJson(e)).toList();
  return ChartPie(
    lineData: lineData,
    height: height,
    animate: animate,
    arcWidth: arcWidth,
    titleFontSize: titleFontSize,
    maskFontSize: maskFontSize,
    showLegend: showLegend,
    showChartTitle: showChartTitle,
    loadingWidget: loadingWidget,
  );
}