AreaChartWidget constructor

const AreaChartWidget({
  1. Key? key,
  2. required List<ChartDataSet> dataSets,
  3. ChartTheme? theme,
  4. double lineWidth = 3.0,
  5. bool showPoints = true,
  6. bool showGrid = true,
  7. bool showAxis = true,
  8. bool showLabel = true,
  9. String? title,
  10. String? subtitle,
  11. bool useGlassmorphism = false,
  12. bool useNeumorphism = false,
  13. ChartPointCallback? onPointTap,
  14. bool isLoading = false,
  15. bool isError = false,
  16. String? errorMessage,
})

Creates an area chart widget.

dataSets must not be empty. Each dataset must contain at least one data point. theme is optional and will be inferred from the Material theme if not provided.

The lineWidth defaults to 3.0 pixels. Use onPointTap to handle user interactions with data points.

Implementation

const AreaChartWidget({
  super.key,
  required this.dataSets,
  this.theme,
  this.lineWidth = 3.0,
  this.showPoints = true,
  this.showGrid = true,
  this.showAxis = true,
  this.showLabel = true,
  this.title,
  this.subtitle,
  this.useGlassmorphism = false,
  this.useNeumorphism = false,
  this.onPointTap,
  this.isLoading = false,
  this.isError = false,
  this.errorMessage,
});