TPieChart constructor

const TPieChart({
  1. Key? key,
  2. required String title,
  3. required List<PieChartData> data,
  4. VoidCallback? optionTap,
  5. bool showLegends = true,
  6. bool showOption = true,
  7. double? height = 300,
})

Creates a TPieChart instance.

  • title: The title of the pie chart.
  • data: A list of PieChartData representing chart values.
  • optionTap: An optional callback when the options button is tapped.
  • showLegends: A flag to control the visibility of legends.
  • showOption: A flag to control the visibility of the options button.
  • height: The height of the pie chart.

Implementation

const TPieChart({
  super.key,
  required this.title,
  required this.data,
  this.optionTap,
  this.showLegends = true,
  this.showOption = true,
  this.height = 300,
});