PieChart constructor

PieChart({
  1. required List<double> values,
  2. int? width,
  3. int? height,
  4. List<UvStyle>? sliceStyles,
  5. bool useBackground = true,
  6. bool donut = false,
  7. double innerRadiusRatio = 0.45,
  8. double cellAspect = 2.0,
  9. String glyph = ' ',
  10. List<ChartLegendEntry>? legendEntries,
  11. int legendColumns = 1,
  12. int legendRowGap = 0,
  13. ChartLegendPosition legendPosition = ChartLegendPosition.topRight,
  14. int legendPadding = 1,
  15. int? crosshairX,
  16. int? crosshairY,
  17. UvStyle? crosshairStyle,
  18. Key? key,
})

Creates a PieChart with the given data and display options.

When width or height is null the chart fills the available constraint space (responsive mode).

Set crosshairX and crosshairY to draw a crosshair overlay at that position (e.g. from mouse hover).

Implementation

PieChart({
  required this.values,
  this.width,
  this.height,
  this.sliceStyles,
  this.useBackground = true,
  this.donut = false,
  this.innerRadiusRatio = 0.45,
  this.cellAspect = 2.0,
  this.glyph = ' ',
  this.legendEntries,
  this.legendColumns = 1,
  this.legendRowGap = 0,
  this.legendPosition = ChartLegendPosition.topRight,
  this.legendPadding = 1,
  this.crosshairX,
  this.crosshairY,
  this.crosshairStyle,
  super.key,
});