TLineChart constructor

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

Creates a line chart widget.

  • title: The chart's title.
  • data: The series data for the chart.
  • legendLabels: Labels for the chart legends.
  • optionTap: A callback function for the options button.
  • showLegends: Whether to show legends.
  • showOption: Whether to show the options button.
  • height: The height of the chart widget.

Implementation

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