DoughnutSeries<T, D> constructor

DoughnutSeries<T, D>({
  1. ValueKey<String>? key,
  2. ChartSeriesRendererFactory<T, D>? onCreateRenderer,
  3. CircularSeriesRendererCreatedCallback? onRendererCreated,
  4. ChartPointInteractionCallback? onPointTap,
  5. ChartPointInteractionCallback? onPointDoubleTap,
  6. ChartPointInteractionCallback? onPointLongPress,
  7. List<T>? dataSource,
  8. required ChartValueMapper<T, D> xValueMapper,
  9. required ChartValueMapper<T, num> yValueMapper,
  10. ChartValueMapper<T, Color>? pointColorMapper,
  11. ChartShaderMapper<T>? pointShaderMapper,
  12. ChartValueMapper<T, String>? pointRadiusMapper,
  13. ChartValueMapper<T, String>? dataLabelMapper,
  14. ChartValueMapper<T, String>? sortFieldValueMapper,
  15. int? startAngle,
  16. int? endAngle,
  17. String? radius,
  18. String? innerRadius,
  19. bool? explode,
  20. bool? explodeAll,
  21. int? explodeIndex,
  22. String? explodeOffset,
  23. ActivationMode? explodeGesture,
  24. double? groupTo,
  25. CircularChartGroupMode? groupMode,
  26. PointRenderMode? pointRenderMode,
  27. EmptyPointSettings? emptyPointSettings,
  28. Color? strokeColor,
  29. double? strokeWidth,
  30. DataLabelSettings? dataLabelSettings,
  31. bool? enableTooltip,
  32. String? name,
  33. double? opacity,
  34. double? animationDuration,
  35. double? animationDelay,
  36. SelectionBehavior? selectionBehavior,
  37. SortingOrder? sortingOrder,
  38. LegendIconType? legendIconType,
  39. CornerStyle? cornerStyle,
  40. List<int>? initialSelectedDataIndexes,
})

Creating an argument constructor of DoughnutSeries class.

Implementation

DoughnutSeries(
    {ValueKey<String>? key,
    ChartSeriesRendererFactory<T, D>? onCreateRenderer,
    CircularSeriesRendererCreatedCallback? onRendererCreated,
    ChartPointInteractionCallback? onPointTap,
    ChartPointInteractionCallback? onPointDoubleTap,
    ChartPointInteractionCallback? onPointLongPress,
    List<T>? dataSource,
    required ChartValueMapper<T, D> xValueMapper,
    required ChartValueMapper<T, num> yValueMapper,
    ChartValueMapper<T, Color>? pointColorMapper,
    ChartShaderMapper<T>? pointShaderMapper,
    ChartValueMapper<T, String>? pointRadiusMapper,
    ChartValueMapper<T, String>? dataLabelMapper,
    ChartValueMapper<T, String>? sortFieldValueMapper,
    int? startAngle,
    int? endAngle,
    String? radius,
    String? innerRadius,
    bool? explode,
    bool? explodeAll,
    int? explodeIndex,
    String? explodeOffset,
    ActivationMode? explodeGesture,
    double? groupTo,
    CircularChartGroupMode? groupMode,
    PointRenderMode? pointRenderMode,
    EmptyPointSettings? emptyPointSettings,
    Color? strokeColor,
    double? strokeWidth,
    DataLabelSettings? dataLabelSettings,
    bool? enableTooltip,
    String? name,
    double? opacity,
    double? animationDuration,
    double? animationDelay,
    SelectionBehavior? selectionBehavior,
    SortingOrder? sortingOrder,
    LegendIconType? legendIconType,
    CornerStyle? cornerStyle,
    List<int>? initialSelectedDataIndexes})
    : super(
        key: key,
        onCreateRenderer: onCreateRenderer,
        onRendererCreated: onRendererCreated,
        onPointTap: onPointTap,
        onPointDoubleTap: onPointDoubleTap,
        onPointLongPress: onPointLongPress,
        dataSource: dataSource,
        xValueMapper: (int index) => xValueMapper(dataSource![index], index),
        yValueMapper: (int index) => yValueMapper(dataSource![index], index),
        pointColorMapper: (int index) => pointColorMapper != null
            ? pointColorMapper(dataSource![index], index)
            : null,
        pointRadiusMapper: pointRadiusMapper == null
            ? null
            : (int index) => pointRadiusMapper(dataSource![index], index),
        pointShaderMapper: pointShaderMapper != null
            ? (dynamic data, int index, Color color, Rect rect) =>
                pointShaderMapper(dataSource![index], index, color, rect)
            : null,
        dataLabelMapper: (int index) => dataLabelMapper != null
            ? dataLabelMapper(dataSource![index], index)
            : null,
        sortFieldValueMapper: sortFieldValueMapper != null
            ? (int index) => sortFieldValueMapper(dataSource![index], index)
            : null,
        animationDuration: animationDuration,
        animationDelay: animationDelay,
        startAngle: startAngle,
        endAngle: endAngle,
        radius: radius,
        innerRadius: innerRadius,
        explode: explode,
        opacity: opacity,
        explodeAll: explodeAll,
        explodeIndex: explodeIndex,
        explodeOffset: explodeOffset,
        explodeGesture: explodeGesture,
        pointRenderMode: pointRenderMode,
        groupMode: groupMode,
        groupTo: groupTo,
        emptyPointSettings: emptyPointSettings,
        borderColor: strokeColor,
        borderWidth: strokeWidth,
        dataLabelSettings: dataLabelSettings,
        enableTooltip: enableTooltip,
        name: name,
        selectionBehavior: selectionBehavior,
        legendIconType: legendIconType,
        sortingOrder: sortingOrder,
        cornerStyle: cornerStyle,
        initialSelectedDataIndexes: initialSelectedDataIndexes,
      );