XyDataSeries<T, D> constructor

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

Creating an argument constructor of XyDataSeries class.

Implementation

XyDataSeries(
    {ValueKey<String>? key,
    ChartSeriesRendererFactory<T, D>? onCreateRenderer,
    SeriesRendererCreatedCallback? onRendererCreated,
    ChartPointInteractionCallback? onPointTap,
    ChartPointInteractionCallback? onPointDoubleTap,
    ChartPointInteractionCallback? onPointLongPress,
    CartesianShaderCallback? onCreateShader,
    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,
    SelectionBehavior? selectionBehavior,
    bool? isVisibleInLegend,
    LegendIconType? legendIconType,
    double? opacity,
    double? animationDelay,
    Color? color,
    List<int>? initialSelectedDataIndexes,
    SortingOrder? sortingOrder})
    : super(
          key: key,
          onRendererCreated: onRendererCreated,
          onCreateRenderer: onCreateRenderer,
          onPointTap: onPointTap,
          onPointDoubleTap: onPointDoubleTap,
          onPointLongPress: onPointLongPress,
          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,
          selectionBehavior: selectionBehavior,
          legendIconType: legendIconType,
          sortingOrder: sortingOrder,
          opacity: opacity,
          animationDelay: animationDelay,
          onCreateShader: onCreateShader,
          gradient: gradient,
          borderGradient: borderGradient,
          markerSettings: markerSettings,
          initialSelectedDataIndexes: initialSelectedDataIndexes);