SfCartesianChart constructor
SfCartesianChart({
- Key? key,
- Color? backgroundColor,
- bool enableSideBySideSeriesPlacement = true,
- Color borderColor = Colors.transparent,
- double borderWidth = 0,
- Color? plotAreaBackgroundColor,
- Color? plotAreaBorderColor,
- double plotAreaBorderWidth = 0.7,
- ImageProvider<
Object> ? plotAreaBackgroundImage, - ChartTooltipCallback? onTooltipRender,
- ChartActualRangeChangedCallback? onActualRangeChanged,
- ChartDataLabelRenderCallback? onDataLabelRender,
- ChartLegendRenderCallback? onLegendItemRender,
- ChartTrackballCallback? onTrackballPositionChanging,
- ChartCrosshairCallback? onCrosshairPositionChanging,
- ChartZoomingCallback? onZooming,
- ChartZoomingCallback? onZoomStart,
- ChartZoomingCallback? onZoomEnd,
- ChartZoomingCallback? onZoomReset,
- ChartAxisLabelTapCallback? onAxisLabelTapped,
- DataLabelTapCallback? onDataLabelTapped,
- ChartLegendTapCallback? onLegendTapped,
- ChartSelectionCallback? onSelectionChanged,
- ChartTouchInteractionCallback? onChartTouchInteractionUp,
- ChartTouchInteractionCallback? onChartTouchInteractionDown,
- ChartTouchInteractionCallback? onChartTouchInteractionMove,
- ChartMarkerRenderCallback? onMarkerRender,
- bool isTransposed = false,
- bool enableAxisAnimation = false,
- List<
CartesianChartAnnotation> ? annotations, - LoadMoreViewBuilderCallback? loadMoreIndicatorBuilder,
- ChartPlotAreaSwipeCallback? onPlotAreaSwipe,
- 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)], - ChartAxis? primaryXAxis,
- ChartAxis? primaryYAxis,
- EdgeInsets? margin,
- TooltipBehavior? tooltipBehavior,
- ZoomPanBehavior? zoomPanBehavior,
- Legend? legend,
- SelectionType? selectionType,
- ActivationMode? selectionGesture,
- bool? enableMultiSelection,
- CrosshairBehavior? crosshairBehavior,
- TrackballBehavior? trackballBehavior,
- dynamic series,
- ChartTitle? title,
- List<
ChartAxis> ? axes, - List<
TechnicalIndicators> ? indicators,
Creating an argument constructor of SfCartesianChart class.
Implementation
SfCartesianChart(
{Key? key,
this.backgroundColor,
this.enableSideBySideSeriesPlacement = true,
this.borderColor = Colors.transparent,
this.borderWidth = 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)
],
ChartAxis? primaryXAxis,
ChartAxis? primaryYAxis,
EdgeInsets? margin,
TooltipBehavior? tooltipBehavior,
ZoomPanBehavior? zoomPanBehavior,
Legend? legend,
SelectionType? selectionType,
ActivationMode? selectionGesture,
bool? enableMultiSelection,
CrosshairBehavior? crosshairBehavior,
TrackballBehavior? trackballBehavior,
dynamic series,
ChartTitle? title,
List<ChartAxis>? axes,
List<TechnicalIndicators<dynamic, dynamic>>? indicators})
: primaryXAxis = primaryXAxis ?? NumericAxis(),
primaryYAxis = primaryYAxis ?? NumericAxis(),
title = title ?? ChartTitle(),
axes = axes ?? <ChartAxis>[],
series = series ?? <ChartSeries<dynamic, dynamic>>[],
margin = margin ?? const EdgeInsets.all(10),
zoomPanBehavior = zoomPanBehavior ?? ZoomPanBehavior(),
tooltipBehavior = tooltipBehavior ?? TooltipBehavior(),
crosshairBehavior = crosshairBehavior ?? CrosshairBehavior(),
trackballBehavior = trackballBehavior ?? TrackballBehavior(),
legend = legend ?? const Legend(),
selectionType = selectionType ?? SelectionType.point,
selectionGesture = selectionGesture ?? ActivationMode.singleTap,
enableMultiSelection = enableMultiSelection ?? false,
indicators = indicators ?? <TechnicalIndicators<dynamic, dynamic>>[],
super(key: key);