BarChartGroupData constructor

BarChartGroupData({
  1. required int x,
  2. bool? groupVertically,
  3. List<BarChartRodData>? barRods,
  4. double? barsSpace,
  5. List<int>? showingTooltipIndicators,
})

BarChart renders groups, and arrange them using alignment, x value defines the group's value in the x axis (set them incrementally). it renders a list of BarChartRodData that represents a rod (or a bar) in the bar chart, and applies barsSpace between them.

you can show some tooltipIndicators (a popup with an information) on top of each BarChartRodData using showingTooltipIndicators, just put indices you want to show it on top of them.

Implementation

BarChartGroupData({
  required this.x,
  bool? groupVertically,
  List<BarChartRodData>? barRods,
  double? barsSpace,
  List<int>? showingTooltipIndicators,
})  : groupVertically = groupVertically ?? false,
      barRods = barRods ?? const [],
      barsSpace = barsSpace ?? 2,
      showingTooltipIndicators = showingTooltipIndicators ?? const [];