barCorners method
BarCorners
barCorners(
- IBarDataSet dataSet,
- int pos,
- int sections, [
- BarCorners outermost = BarCorners.TOP,
Corners to round for the bar rect at pos of a data set: all for plain bars and, in a stack, all of every
section when the set rounds its sections, otherwise only the end of the outermost one.
sections is how many values the entry this rect belongs to carries, which is at most the stack size of the
data set; an entry that carries fewer leaves the rest of its room in the buffer empty. outermost is the
corners of the section farthest from zero, which is the top in a vertical bar chart.
Implementation
@protected
BarCorners barCorners(
IBarDataSet dataSet,
int pos,
int sections, [
BarCorners outermost = BarCorners.TOP,
]) {
if (!dataSet.isStacked) return BarCorners.ALL;
if (dataSet.isStackSectionsRounded) return BarCorners.ALL;
return pos % dataSet.stackSize == sections - 1
? outermost
: BarCorners.NONE;
}