copyWith method

ChartConfig copyWith({
  1. List<ChartSeries>? series,
  2. ChartViewport? viewport,
  3. ChartTheme? theme,
  4. ChartTemplateStyle? template,
  5. bool? showGrid,
  6. bool? showAxis,
  7. String? xAxisTitle,
  8. String? yAxisTitle,
  9. String? title,
  10. String? subtitle,
  11. bool? showLegend,
  12. LegendPosition? legendPosition,
  13. bool? showBorder,
  14. double? barBorderRadius,
  15. bool? animate,
  16. Duration? animationDuration,
  17. double? curveTension,
  18. String? semanticLabel,
})

Implementation

ChartConfig copyWith({
  List<ChartSeries>? series,
  ChartViewport? viewport,
  ChartTheme? theme,
  ChartTemplateStyle? template,
  bool? showGrid,
  bool? showAxis,
  String? xAxisTitle,
  String? yAxisTitle,
  String? title,
  String? subtitle,
  bool? showLegend,
  LegendPosition? legendPosition,
  bool? showBorder,
  double? barBorderRadius,
  bool? animate,
  Duration? animationDuration,
  double? curveTension,
  String? semanticLabel,
}) {
  return ChartConfig(
    series: series ?? this.series,
    viewport: viewport ?? this.viewport,
    theme: theme ?? this.theme,
    template: template ?? this.template,
    showGrid: showGrid ?? this.showGrid,
    showAxis: showAxis ?? this.showAxis,
    xAxisTitle: xAxisTitle ?? this.xAxisTitle,
    yAxisTitle: yAxisTitle ?? this.yAxisTitle,
    title: title ?? this.title,
    subtitle: subtitle ?? this.subtitle,
    showLegend: showLegend ?? this.showLegend,
    legendPosition: legendPosition ?? this.legendPosition,
    showBorder: showBorder ?? this.showBorder,
    barBorderRadius: barBorderRadius ?? this.barBorderRadius,
    animate: animate ?? this.animate,
    animationDuration: animationDuration ?? this.animationDuration,
    curveTension: curveTension ?? this.curveTension,
    semanticLabel: semanticLabel ?? this.semanticLabel,
  );
}