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, - MarkerSettings? markerSettings,
- bool? isVisible,
- bool? enableTooltip,
- EmptyPointSettings? emptyPointSettings,
- DataLabelSettings? dataLabelSettings,
- double? animationDuration,
- List<
double> ? dashArray, - List<
int> ? initialSelectedDataIndexes, - Color? borderColor,
- double? borderWidth,
- SelectionSettings? selectionSettings,
- SelectionBehavior? selectionBehavior,
- bool? isVisibleInLegend,
- LegendIconType? legendIconType,
- double? opacity,
- 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,
MarkerSettings? markerSettings,
bool? isVisible,
bool? enableTooltip,
EmptyPointSettings? emptyPointSettings,
DataLabelSettings? dataLabelSettings,
double? animationDuration,
List<double>? dashArray,
List<int>? initialSelectedDataIndexes,
Color? borderColor,
double? borderWidth,
// ignore: deprecated_member_use_from_same_package
SelectionSettings? selectionSettings,
SelectionBehavior? selectionBehavior,
bool? isVisibleInLegend,
LegendIconType? legendIconType,
double? opacity,
SortingOrder? sortingOrder})
: isVisible = isVisible ?? true,
markerSettings = markerSettings ?? const MarkerSettings(),
dataLabelSettings = dataLabelSettings ?? DataLabelSettings(),
enableTooltip = enableTooltip ?? true,
emptyPointSettings = emptyPointSettings ?? EmptyPointSettings(),
dashArray = dashArray ?? <double>[0, 0],
initialSelectedDataIndexes = initialSelectedDataIndexes ?? <int>[],
animationDuration = animationDuration ?? 1500,
borderColor = borderColor ?? Colors.transparent,
// ignore: deprecated_member_use_from_same_package
selectionSettings = selectionSettings ?? SelectionSettings(),
selectionBehavior = selectionBehavior ?? SelectionBehavior(),
legendIconType = legendIconType ?? LegendIconType.seriesType,
isVisibleInLegend = isVisibleInLegend ?? true,
borderWidth = borderWidth ?? 0,
opacity = opacity ?? 1,
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,
selectionSettings: selectionSettings,
selectionBehavior: selectionBehavior,
legendIconType: legendIconType,
sortingOrder: sortingOrder,
opacity: opacity);