XyDataSeries<T, D> constructor

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

Creating an argument constructor of XyDataSeries class.

Implementation

XyDataSeries(
    {ValueKey<String>? key,
    ChartSeriesRendererFactory<T, D>? onCreateRenderer,
    SeriesRendererCreatedCallback? onRendererCreated,
    ChartValueMapper<T, D>? xValueMapper,
    ChartValueMapper<T, dynamic>? yValueMapper,
    ChartValueMapper<T, String>? dataLabelMapper,
    String? name,
    required List<T> dataSource,
    String? xAxisName,
    String? yAxisName,
    ChartValueMapper<T, Color>? pointColorMapper,
    String? legendItemText,
    ChartValueMapper<T, dynamic>? sortFieldValueMapper,
    LinearGradient? gradient,
    LinearGradient? borderGradient,
    ChartValueMapper<T, num>? sizeValueMapper,
    ChartValueMapper<T, num>? highValueMapper,
    ChartValueMapper<T, num>? lowValueMapper,
    ChartValueMapper<T, bool>? intermediateSumPredicate,
    ChartValueMapper<T, bool>? totalSumPredicate,
    List<Trendline>? trendlines,
    double? width,
    MarkerSettings? markerSettings,
    bool? isVisible,
    bool? enableTooltip,
    EmptyPointSettings? emptyPointSettings,
    DataLabelSettings? dataLabelSettings,
    double? animationDuration,
    List<double>? dashArray,
    Color? borderColor,
    double? borderWidth,
    // ignore: deprecated_member_use_from_same_package
    SelectionSettings? selectionSettings,
    SelectionBehavior? selectionBehavior,
    bool? isVisibleInLegend,
    LegendIconType? legendIconType,
    double? opacity,
    Color? color,
    List<int>? initialSelectedDataIndexes,
    SortingOrder? sortingOrder})
    : super(
          key: key,
          onRendererCreated: onRendererCreated,
          onCreateRenderer: onCreateRenderer,
          isVisible: isVisible,
          legendItemText: legendItemText,
          xAxisName: xAxisName,
          dashArray: dashArray,
          isVisibleInLegend: isVisibleInLegend,
          borderColor: borderColor,
          trendlines: trendlines,
          borderWidth: borderWidth,
          yAxisName: yAxisName,
          color: color,
          name: name,
          width: width,
          xValueMapper: xValueMapper != null
              ? (int index) => xValueMapper(dataSource[index], index)
              : null,
          yValueMapper: yValueMapper != null
              ? (int index) => yValueMapper(dataSource[index], index)
              : null,
          sortFieldValueMapper: sortFieldValueMapper != null
              ? (int index) => sortFieldValueMapper(dataSource[index], index)
              : null,
          pointColorMapper: pointColorMapper != null
              ? (int index) => pointColorMapper(dataSource[index], index)
              : null,
          dataLabelMapper: dataLabelMapper != null
              ? (int index) => dataLabelMapper(dataSource[index], index)
              : null,
          sizeValueMapper: sizeValueMapper != null
              ? (int index) => sizeValueMapper(dataSource[index], index)
              : null,
          highValueMapper: highValueMapper != null
              ? (int index) => highValueMapper(dataSource[index], index)
              : null,
          lowValueMapper: lowValueMapper != null
              ? (int index) => lowValueMapper(dataSource[index], index)
              : null,
          intermediateSumPredicate: intermediateSumPredicate != null
              ? (int index) =>
                  intermediateSumPredicate(dataSource[index], index)
              : null,
          totalSumPredicate: totalSumPredicate != null
              ? (int index) => totalSumPredicate(dataSource[index], index)
              : null,
          dataSource: dataSource,
          emptyPointSettings: emptyPointSettings,
          dataLabelSettings: dataLabelSettings,
          enableTooltip: enableTooltip,
          animationDuration: animationDuration,
          selectionSettings: selectionSettings,
          selectionBehavior: selectionBehavior,
          legendIconType: legendIconType,
          sortingOrder: sortingOrder,
          opacity: opacity,
          gradient: gradient,
          borderGradient: borderGradient,
          markerSettings: markerSettings,
          initialSelectedDataIndexes: initialSelectedDataIndexes);