DoughnutSeries<T, D> constructor
DoughnutSeries<T, D> ({
- 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,
- SelectionSettings? selectionSettings,
- SelectionBehavior? selectionBehavior,
- SortingOrder? sortingOrder,
- LegendIconType? legendIconType,
- CornerStyle? cornerStyle,
- 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,
);