SfCircularChart constructor

SfCircularChart({
  1. Key? key,
  2. Color? backgroundColor,
  3. ImageProvider<Object>? backgroundImage,
  4. List<CircularChartAnnotation>? annotations,
  5. Color borderColor = Colors.transparent,
  6. double borderWidth = 0.0,
  7. CircularLegendRenderCallback? onLegendItemRender,
  8. CircularTooltipCallback? onTooltipRender,
  9. CircularDatalabelRenderCallback? onDataLabelRender,
  10. DataLabelTapCallback? onDataLabelTapped,
  11. ChartLegendTapCallback? onLegendTapped,
  12. CircularSelectionCallback? onSelectionChanged,
  13. CircularTouchInteractionCallback? onChartTouchInteractionUp,
  14. CircularTouchInteractionCallback? onChartTouchInteractionDown,
  15. CircularTouchInteractionCallback? onChartTouchInteractionMove,
  16. CircularShaderCallback? onCreateShader,
  17. List<Color> palette = const <Color>[Color.fromRGBO(75, 135, 185, 1), Color.fromRGBO(192, 108, 132, 1), Color.fromRGBO(246, 114, 128, 1), Color.fromRGBO(248, 177, 149, 1), Color.fromRGBO(116, 180, 155, 1), Color.fromRGBO(0, 168, 181, 1), Color.fromRGBO(73, 76, 162, 1), Color.fromRGBO(255, 205, 96, 1), Color.fromRGBO(255, 240, 219, 1), Color.fromRGBO(238, 238, 238, 1)],
  18. ChartTitle? title,
  19. EdgeInsets? margin,
  20. List<CircularSeries>? series,
  21. Legend? legend,
  22. String? centerX,
  23. String? centerY,
  24. TooltipBehavior? tooltipBehavior,
  25. ActivationMode? selectionGesture,
  26. bool? enableMultiSelection,
})

Creating an argument constructor of SfCircularChart class.

Implementation

SfCircularChart(
    {Key? key,
    this.backgroundColor,
    this.backgroundImage,
    this.annotations,
    this.borderColor = Colors.transparent,
    this.borderWidth = 0.0,
    this.onLegendItemRender,
    this.onTooltipRender,
    this.onDataLabelRender,
    this.onDataLabelTapped,
    this.onLegendTapped,
    this.onSelectionChanged,
    this.onChartTouchInteractionUp,
    this.onChartTouchInteractionDown,
    this.onChartTouchInteractionMove,
    this.onCreateShader,
    this.palette = const <Color>[
      Color.fromRGBO(75, 135, 185, 1),
      Color.fromRGBO(192, 108, 132, 1),
      Color.fromRGBO(246, 114, 128, 1),
      Color.fromRGBO(248, 177, 149, 1),
      Color.fromRGBO(116, 180, 155, 1),
      Color.fromRGBO(0, 168, 181, 1),
      Color.fromRGBO(73, 76, 162, 1),
      Color.fromRGBO(255, 205, 96, 1),
      Color.fromRGBO(255, 240, 219, 1),
      Color.fromRGBO(238, 238, 238, 1)
    ],
    ChartTitle? title,
    EdgeInsets? margin,
    List<CircularSeries<dynamic, dynamic>>? series,
    Legend? legend,
    String? centerX,
    String? centerY,
    TooltipBehavior? tooltipBehavior,
    ActivationMode? selectionGesture,
    bool? enableMultiSelection})
    : series = series = series ?? <CircularSeries<dynamic, dynamic>>[],
      title = title ?? ChartTitle(),
      legend = legend ?? const Legend(),
      margin = margin ?? const EdgeInsets.fromLTRB(10, 10, 10, 10),
      centerX = centerX ?? '50%',
      centerY = centerY ?? '50%',
      tooltipBehavior = tooltipBehavior ?? TooltipBehavior(),
      selectionGesture = selectionGesture ?? ActivationMode.singleTap,
      enableMultiSelection = enableMultiSelection ?? false,
      super(key: key);