CartesianSeries<T, D> constructor

CartesianSeries<T, D>({
  1. ValueKey<String>? key,
  2. ChartIndexedValueMapper<D>? xValueMapper,
  3. ChartIndexedValueMapper? yValueMapper,
  4. ChartIndexedValueMapper<String>? dataLabelMapper,
  5. String? name,
  6. required List<T> dataSource,
  7. String? xAxisName,
  8. String? yAxisName,
  9. ChartIndexedValueMapper<num>? sizeValueMapper,
  10. ChartIndexedValueMapper<Color>? pointColorMapper,
  11. Color? color,
  12. String? legendItemText,
  13. ChartIndexedValueMapper? sortFieldValueMapper,
  14. LinearGradient? gradient,
  15. LinearGradient? borderGradient,
  16. double? width,
  17. ChartIndexedValueMapper<num>? highValueMapper,
  18. ChartIndexedValueMapper<num>? lowValueMapper,
  19. ChartIndexedValueMapper<bool>? intermediateSumPredicate,
  20. ChartIndexedValueMapper<bool>? totalSumPredicate,
  21. List<Trendline>? trendlines,
  22. SeriesRendererCreatedCallback? onRendererCreated,
  23. ChartSeriesRendererFactory<T, D>? onCreateRenderer,
  24. MarkerSettings? markerSettings,
  25. bool? isVisible,
  26. bool? enableTooltip,
  27. EmptyPointSettings? emptyPointSettings,
  28. DataLabelSettings? dataLabelSettings,
  29. double? animationDuration,
  30. List<double>? dashArray,
  31. List<int>? initialSelectedDataIndexes,
  32. Color? borderColor,
  33. double? borderWidth,
  34. SelectionSettings? selectionSettings,
  35. SelectionBehavior? selectionBehavior,
  36. bool? isVisibleInLegend,
  37. LegendIconType? legendIconType,
  38. double? opacity,
  39. 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);