CartesianSeries<T, D> constructor
CartesianSeries<T, D> ({
- ValueKey<
String> ? key, - ChartIndexedValueMapper<
D> ? xValueMapper, - ChartIndexedValueMapper? yValueMapper,
- ChartIndexedValueMapper<
String> ? dataLabelMapper, - String? name,
- required List<
T> dataSource, - String? xAxisName,
- String? yAxisName,
- ChartIndexedValueMapper<
num> ? sizeValueMapper, - ChartIndexedValueMapper<
Color> ? pointColorMapper, - Color? color,
- String? legendItemText,
- ChartIndexedValueMapper? sortFieldValueMapper,
- LinearGradient? gradient,
- LinearGradient? borderGradient,
- double? width,
- ChartIndexedValueMapper<
num> ? highValueMapper, - ChartIndexedValueMapper<
num> ? lowValueMapper, - ChartIndexedValueMapper<
bool> ? intermediateSumPredicate, - ChartIndexedValueMapper<
bool> ? totalSumPredicate, - List<
Trendline> ? trendlines, - SeriesRendererCreatedCallback? onRendererCreated,
- ChartSeriesRendererFactory<
T, D> ? onCreateRenderer, - ChartPointInteractionCallback? onPointTap,
- ChartPointInteractionCallback? onPointDoubleTap,
- ChartPointInteractionCallback? onPointLongPress,
- CartesianShaderCallback? onCreateShader,
- MarkerSettings? markerSettings,
- bool? isVisible,
- bool? enableTooltip,
- EmptyPointSettings? emptyPointSettings,
- DataLabelSettings? dataLabelSettings,
- double? animationDuration,
- List<
double> ? dashArray, - List<
int> ? initialSelectedDataIndexes, - Color? borderColor,
- double? borderWidth,
- SelectionBehavior? selectionBehavior,
- bool? isVisibleInLegend,
- LegendIconType? legendIconType,
- double? opacity,
- double? animationDelay,
- SortingOrder? sortingOrder,
Creating an argument constructor of CartesianSeries class.
Implementation
CartesianSeries(
{this.key,
this.xValueMapper,
this.yValueMapper,
this.dataLabelMapper,
this.name,
required this.dataSource,
this.xAxisName,
this.yAxisName,
this.sizeValueMapper,
this.pointColorMapper,
this.color,
this.legendItemText,
this.sortFieldValueMapper,
this.gradient,
this.borderGradient,
this.width,
this.highValueMapper,
this.lowValueMapper,
this.intermediateSumPredicate,
this.totalSumPredicate,
this.trendlines,
this.onRendererCreated,
this.onCreateRenderer,
this.onPointTap,
this.onPointDoubleTap,
this.onPointLongPress,
this.onCreateShader,
MarkerSettings? markerSettings,
bool? isVisible,
bool? enableTooltip,
EmptyPointSettings? emptyPointSettings,
DataLabelSettings? dataLabelSettings,
double? animationDuration,
List<double>? dashArray,
List<int>? initialSelectedDataIndexes,
Color? borderColor,
double? borderWidth,
SelectionBehavior? selectionBehavior,
bool? isVisibleInLegend,
LegendIconType? legendIconType,
double? opacity,
double? animationDelay,
SortingOrder? sortingOrder})
: isVisible = isVisible ?? true,
markerSettings = markerSettings ?? const MarkerSettings(),
dataLabelSettings = dataLabelSettings ?? const DataLabelSettings(),
enableTooltip = enableTooltip ?? true,
emptyPointSettings = emptyPointSettings ?? EmptyPointSettings(),
dashArray = dashArray ?? <double>[0, 0],
assert(dashArray == null || dashArray.isNotEmpty,
'The dashArray list must not be empty'),
initialSelectedDataIndexes = initialSelectedDataIndexes ?? <int>[],
animationDuration = animationDuration ?? 1500,
borderColor = borderColor ?? Colors.transparent,
selectionBehavior = selectionBehavior ?? SelectionBehavior(),
legendIconType = legendIconType ?? LegendIconType.seriesType,
isVisibleInLegend = isVisibleInLegend ?? true,
borderWidth = borderWidth ?? 0,
opacity = opacity ?? 1,
animationDelay = animationDelay ?? 0,
sortingOrder = sortingOrder ?? SortingOrder.none,
super(
name: name,
xValueMapper: xValueMapper,
yValueMapper: yValueMapper,
sortFieldValueMapper: sortFieldValueMapper,
pointColorMapper: pointColorMapper,
dataLabelMapper: dataLabelMapper,
dataSource: dataSource,
emptyPointSettings: emptyPointSettings,
dataLabelSettings: dataLabelSettings,
enableTooltip: enableTooltip,
animationDuration: animationDuration,
selectionBehavior: selectionBehavior,
legendIconType: legendIconType,
sortingOrder: sortingOrder,
animationDelay: animationDelay,
opacity: opacity);