BarGroupInfo constructor
- required int index,
- required int count,
- double gap = 2.0,
- BarLayoutMode layoutMode = BarLayoutMode.grouped,
- String? groupId,
- double stackBaseline = 0.0,
- Map<
int, double> startValues = const {}, - Map<
int, double> endValues = const {}, - Map<
int, double> percentages = const {}, - Set<
int> outerPointIndices = const {}, - bool drawTrack = true,
Creates bar group positioning metadata.
index is the 0-based position of this series' category slot.
count is the total number of category slots in the chart.
gap is the pixel spacing between adjacent slots (default 2.0).
Example:
// First bar series out of three
const info = BarGroupInfo(index: 0, count: 3);
// With custom gap
const infoWithGap = BarGroupInfo(index: 1, count: 3, gap: 4.0);
Implementation
const BarGroupInfo({
required this.index,
required this.count,
this.gap = 2.0,
this.layoutMode = BarLayoutMode.grouped,
this.groupId,
this.stackBaseline = 0.0,
this.startValues = const {},
this.endValues = const {},
this.percentages = const {},
this.outerPointIndices = const {},
this.drawTrack = true,
}) : assert(index >= 0, 'index must be non-negative'),
assert(count >= 1, 'count must be at least 1'),
assert(index < count, 'index must be less than count'),
assert(gap >= 0, 'gap must be non-negative');