FFChart constructor

FFChart({
  1. FFChart_ChartType? chartType,
  2. FFDimensions? dimensions,
  3. FFLineChart? lineChart,
  4. Iterable<FFChartData>? data,
  5. FFBarChart? barChart,
  6. FFChartTooltipInfo? tooltipInfo,
  7. FFColor? legacyBackgroundColor,
  8. FFColor? legacyBorderColor,
  9. double? legacyBorderWidth,
  10. bool? legacyShowBorder,
  11. bool? legacyShowGrid,
  12. bool? legacyShowLegend,
  13. FFChartLegendInfo? legendInfo,
  14. bool? hasBeenUpdated,
  15. FFPieChart? pieChart,
  16. FFColorValue? backgroundColorValue,
  17. FFColorValue? borderColorValue,
  18. FFDoubleValue? borderWidthValue,
  19. FFBooleanValue? showBorderValue,
  20. FFBooleanValue? showGridValue,
  21. FFBooleanValue? showLegendValue,
  22. FFColorValue? gridColorValue,
})

Implementation

factory FFChart({
  FFChart_ChartType? chartType,
  FFDimensions? dimensions,
  FFLineChart? lineChart,
  $core.Iterable<FFChartData>? data,
  FFBarChart? barChart,
  FFChartTooltipInfo? tooltipInfo,
  FFColor? legacyBackgroundColor,
  FFColor? legacyBorderColor,
  $core.double? legacyBorderWidth,
  $core.bool? legacyShowBorder,
  $core.bool? legacyShowGrid,
  $core.bool? legacyShowLegend,
  FFChartLegendInfo? legendInfo,
  $core.bool? hasBeenUpdated,
  FFPieChart? pieChart,
  FFColorValue? backgroundColorValue,
  FFColorValue? borderColorValue,
  FFDoubleValue? borderWidthValue,
  FFBooleanValue? showBorderValue,
  FFBooleanValue? showGridValue,
  FFBooleanValue? showLegendValue,
  FFColorValue? gridColorValue,
}) {
  final result = create();
  if (chartType != null) result.chartType = chartType;
  if (dimensions != null) result.dimensions = dimensions;
  if (lineChart != null) result.lineChart = lineChart;
  if (data != null) result.data.addAll(data);
  if (barChart != null) result.barChart = barChart;
  if (tooltipInfo != null) result.tooltipInfo = tooltipInfo;
  if (legacyBackgroundColor != null)
    result.legacyBackgroundColor = legacyBackgroundColor;
  if (legacyBorderColor != null) result.legacyBorderColor = legacyBorderColor;
  if (legacyBorderWidth != null) result.legacyBorderWidth = legacyBorderWidth;
  if (legacyShowBorder != null) result.legacyShowBorder = legacyShowBorder;
  if (legacyShowGrid != null) result.legacyShowGrid = legacyShowGrid;
  if (legacyShowLegend != null) result.legacyShowLegend = legacyShowLegend;
  if (legendInfo != null) result.legendInfo = legendInfo;
  if (hasBeenUpdated != null) result.hasBeenUpdated = hasBeenUpdated;
  if (pieChart != null) result.pieChart = pieChart;
  if (backgroundColorValue != null)
    result.backgroundColorValue = backgroundColorValue;
  if (borderColorValue != null) result.borderColorValue = borderColorValue;
  if (borderWidthValue != null) result.borderWidthValue = borderWidthValue;
  if (showBorderValue != null) result.showBorderValue = showBorderValue;
  if (showGridValue != null) result.showGridValue = showGridValue;
  if (showLegendValue != null) result.showLegendValue = showLegendValue;
  if (gridColorValue != null) result.gridColorValue = gridColorValue;
  return result;
}