SfCartesianChart constructor

const SfCartesianChart(
  1. {Key? key,
  2. Color? backgroundColor,
  3. bool enableSideBySideSeriesPlacement = true,
  4. Color borderColor = Colors.transparent,
  5. double borderWidth = 0.0,
  6. Color? plotAreaBackgroundColor,
  7. Color? plotAreaBorderColor,
  8. double plotAreaBorderWidth = 0.7,
  9. ImageProvider<Object>? plotAreaBackgroundImage,
  10. ChartTooltipCallback? onTooltipRender,
  11. ChartActualRangeChangedCallback? onActualRangeChanged,
  12. ChartDataLabelRenderCallback? onDataLabelRender,
  13. ChartLegendRenderCallback? onLegendItemRender,
  14. ChartTrackballCallback? onTrackballPositionChanging,
  15. ChartCrosshairCallback? onCrosshairPositionChanging,
  16. ChartZoomingCallback? onZooming,
  17. ChartZoomingCallback? onZoomStart,
  18. ChartZoomingCallback? onZoomEnd,
  19. ChartZoomingCallback? onZoomReset,
  20. ChartAxisLabelTapCallback? onAxisLabelTapped,
  21. DataLabelTapCallback? onDataLabelTapped,
  22. ChartLegendTapCallback? onLegendTapped,
  23. ChartSelectionCallback? onSelectionChanged,
  24. ChartTouchInteractionCallback? onChartTouchInteractionUp,
  25. ChartTouchInteractionCallback? onChartTouchInteractionDown,
  26. ChartTouchInteractionCallback? onChartTouchInteractionMove,
  27. ChartMarkerRenderCallback? onMarkerRender,
  28. bool isTransposed = false,
  29. bool enableAxisAnimation = false,
  30. List<CartesianChartAnnotation>? annotations,
  31. LoadMoreViewBuilderCallback? loadMoreIndicatorBuilder,
  32. ChartPlotAreaSwipeCallback? onPlotAreaSwipe,
  33. 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)],
  34. ChartAxis primaryXAxis = const NumericAxis(),
  35. ChartAxis primaryYAxis = const NumericAxis(),
  36. EdgeInsets margin = const EdgeInsets.all(10),
  37. TooltipBehavior? tooltipBehavior,
  38. ZoomPanBehavior? zoomPanBehavior,
  39. Legend legend = const Legend(),
  40. SelectionType selectionType = SelectionType.point,
  41. ActivationMode selectionGesture = ActivationMode.singleTap,
  42. bool enableMultiSelection = false,
  43. CrosshairBehavior? crosshairBehavior,
  44. TrackballBehavior? trackballBehavior,
  45. List<CartesianSeries> series = const <CartesianSeries>[],
  46. ChartTitle title = const ChartTitle(),
  47. List<ChartAxis> axes = const <ChartAxis>[],
  48. List<TechnicalIndicator> indicators = const <TechnicalIndicator>[]}
)

Creating an argument constructor of SfCartesianChart class.

Implementation

const SfCartesianChart({
  Key? key,
  this.backgroundColor,
  this.enableSideBySideSeriesPlacement = true,
  this.borderColor = Colors.transparent,
  this.borderWidth = 0.0,
  this.plotAreaBackgroundColor,
  this.plotAreaBorderColor,
  this.plotAreaBorderWidth = 0.7,
  this.plotAreaBackgroundImage,
  this.onTooltipRender,
  this.onActualRangeChanged,
  this.onDataLabelRender,
  this.onLegendItemRender,
  this.onTrackballPositionChanging,
  this.onCrosshairPositionChanging,
  this.onZooming,
  this.onZoomStart,
  this.onZoomEnd,
  this.onZoomReset,
  this.onAxisLabelTapped,
  this.onDataLabelTapped,
  this.onLegendTapped,
  this.onSelectionChanged,
  this.onChartTouchInteractionUp,
  this.onChartTouchInteractionDown,
  this.onChartTouchInteractionMove,
  this.onMarkerRender,
  this.isTransposed = false,
  this.enableAxisAnimation = false,
  this.annotations,
  this.loadMoreIndicatorBuilder,
  this.onPlotAreaSwipe,
  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)
  ],
  this.primaryXAxis = const NumericAxis(),
  this.primaryYAxis = const NumericAxis(),
  this.margin = const EdgeInsets.all(10),
  this.tooltipBehavior,
  this.zoomPanBehavior,
  this.legend = const Legend(),
  this.selectionType = SelectionType.point,
  this.selectionGesture = ActivationMode.singleTap,
  this.enableMultiSelection = false,
  this.crosshairBehavior,
  this.trackballBehavior,
  this.series = const <CartesianSeries>[],
  this.title = const ChartTitle(),
  this.axes = const <ChartAxis>[],
  this.indicators = const <TechnicalIndicator>[],
}) : super(key: key);