ChartBar.withChartData constructor
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,
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,
);
}