DoughnutSeries<T, D> constructor

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

Creating an argument constructor of DoughnutSeries class.

Implementation

DoughnutSeries(
    {ValueKey<String>? key,
    ChartSeriesRendererFactory<T, D>? onCreateRenderer,
    CircularSeriesRendererCreatedCallback? onRendererCreated,
    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,
    bool? enableSmartLabels,
    String? name,
    double? opacity,
    double? animationDuration,
    // ignore: deprecated_member_use_from_same_package
    SelectionSettings? selectionSettings,
    SelectionBehavior? selectionBehavior,
    SortingOrder? sortingOrder,
    LegendIconType? legendIconType,
    CornerStyle? cornerStyle,
    List<int>? initialSelectedDataIndexes})
    : super(
        key: key,
        onCreateRenderer: onCreateRenderer,
        onRendererCreated: onRendererCreated,
        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,
        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,
        selectionSettings: selectionSettings,
        selectionBehavior: selectionBehavior,
        legendIconType: legendIconType,
        sortingOrder: sortingOrder,
        enableSmartLabels: enableSmartLabels,
        cornerStyle: cornerStyle,
        initialSelectedDataIndexes: initialSelectedDataIndexes,
      );