PieDataSet constructor
PieDataSet({
- required num value,
- String? legend,
- required PdfColor color,
- PdfColor? borderColor = PdfColors.white,
- double borderWidth = 1.5,
- bool? drawBorder,
- bool drawSurface = true,
- double surfaceOpacity = 1,
- double offset = 0,
- TextStyle? legendStyle,
- TextAlign? legendAlign,
- PieLegendPosition legendPosition = PieLegendPosition.auto,
- double legendLineWidth = 1.0,
- PdfColor? legendLineColor,
- Widget? legendWidget,
- double legendOffset = 20,
- double innerRadius = 0,
Implementation
PieDataSet({
required this.value,
String? legend,
required PdfColor color,
PdfColor? borderColor = PdfColors.white,
double borderWidth = 1.5,
bool? drawBorder,
this.drawSurface = true,
this.surfaceOpacity = 1,
this.offset = 0,
this.legendStyle,
this.legendAlign,
this.legendPosition = PieLegendPosition.auto,
this.legendLineWidth = 1.0,
PdfColor? legendLineColor,
Widget? legendWidget,
this.legendOffset = 20,
this.innerRadius = 0,
}) : assert(innerRadius >= 0),
assert(offset >= 0),
drawBorder = drawBorder ?? borderColor != null && color != borderColor,
assert((drawBorder ?? borderColor != null && color != borderColor) ||
drawSurface),
_legendWidget = legendWidget,
legendLineColor = legendLineColor ?? color,
super(
legend: legend,
color: color,
borderColor: borderColor,
borderWidth: borderWidth,
);