ChartBar.withChartData constructor

ChartBar.withChartData(
  1. List data, {
  2. bool animate = false,
  3. bool vertical = true,
  4. double height = 200.0,
  5. int titleFontSize = 14,
  6. bool showBarLabel = false,
  7. double maskFontSize = 18.0,
  8. bool showLegend = true,
  9. bool showChartTitle = true,
  10. bool showAxisLine = false,
  11. String groupType = 'grouped',
  12. Widget? loadingWidget,
  13. bool hidePrimaryAxis = false,
  14. bool hideSecondaryAxis = false,
  15. bool hideDomainAxis = false,
})

Implementation

factory ChartBar.withChartData(List data,
    {bool animate = false,
    bool vertical = true,
    double height = 200.0,
    int titleFontSize = 14,
    bool showBarLabel = false,
    double maskFontSize = 18.0,
    bool showLegend = true,
    bool showChartTitle = true,
    bool showAxisLine = false,
    String groupType = 'grouped',
    Widget? loadingWidget,
    bool hidePrimaryAxis = false,
    bool hideSecondaryAxis = false,
    bool hideDomainAxis = false}) {
  var lineData =
      data.map<ChartLineData>((e) => ChartLineData.fromJson(e)).toList();
  return ChartBar(
    lineData: lineData,
    vertical: vertical,
    height: height,
    animate: animate,
    titleFontSize: titleFontSize,
    showBarLabel: showBarLabel,
    maskFontSize: maskFontSize,
    showLegend: showLegend,
    showChartTitle: showChartTitle,
    showAxisLine: showAxisLine,
    loadingWidget: loadingWidget,
    groupType: groupType,
    hidePrimaryAxis: hidePrimaryAxis,
    hideSecondaryAxis: hideSecondaryAxis,
    hideDomainAxis: hideDomainAxis,
  );
}