calcMaxCrossLength property
double
get
calcMaxCrossLength
This will calculate the maximum length of cross axis of bars.
Implementation
double get calcMaxCrossLength {
var res = 0.0;
for (int i = 0; i < groups.length; i++) {
final group = groups[i];
var groupCrossLength = 0.0;
for (int j = 0; j < group.bars.length; j++) {
final bar = group.bars[j];
if (isBarEmpty(bar)) continue;
groupCrossLength += bar.config.width;
}
groupCrossLength += group.bars.length * group.config.interBarSpace;
groupCrossLength = math.max(
_groupLabelSizes[i].getDim(directionNp.flip()),
groupCrossLength,
);
res += groupCrossLength;
}
res += (groups.length - 1) * interGroupSpace;
res += _axisBox?.size.getDim(directionNp.flip()) ?? 0;
return res;
}