BarChartPainter constructor

BarChartPainter({
  1. required ChartTheme theme,
  2. required List<ChartDataSet> dataSets,
  3. bool showGrid = true,
  4. bool showAxis = true,
  5. bool showLabel = true,
  6. double barWidth = 20.0,
  7. double borderRadius = 8.0,
  8. bool barRounded = true,
  9. bool isGrouped = false,
  10. double animationProgress = 1.0,
  11. ChartInteractionResult? selectedBar,
  12. ChartInteractionResult? hoveredBar,
  13. Map<double, List<ChartDataSet>>? groupedData,
  14. List<double>? sortedXValues,
})

Creates a bar chart painter.

theme and dataSets are required and passed to the base class. barWidth defaults to 20.0 pixels. borderRadius defaults to 8.0 pixels. isGrouped defaults to false. animationProgress defaults to 1.0 (fully animated).

The painter will render bars with rounded corners, gradients, and visual feedback for selected/hovered states.

Implementation

BarChartPainter({
  required super.theme,
  required super.dataSets,
  super.showGrid,
  super.showAxis,
  super.showLabel,
  this.barWidth = 20.0,
  this.borderRadius = 8.0,
  this.barRounded = true,
  this.isGrouped = false,
  this.animationProgress = 1.0,
  this.selectedBar,
  this.hoveredBar,
  this.groupedData,
  this.sortedXValues,
});