drawYLabel method Null safety
y축 라벨을 그립니다.
Implementation
void drawYLabel(Canvas canvas, Size size, int k) {
double offsetDx = offset.dx + ((barWidth * hourCntInDay + horizontalLineDashWidth + barSpace * hourCntInDay) * k);
for (var i = 0; i < yLabelCount; i++) {
double yCenter = baseOffsetY +
size.height -
xLabelHourSize -
xLabelHourMargin -
xLabelDaySize -
xLabelDayMargin -
xLabelBirthDaySize -
xLabelBirthDayMargin -
(horizontalLineHeight / 2) -
(yLabelSize / 2) -
(i * (ySectionHeight));
drawHorizontalLine(canvas, offsetDx, yCenter);
if (isBiDirectional) {
yCenter = baseOffsetY +
size.height -
xLabelHourSize -
xLabelHourMargin -
xLabelDaySize -
xLabelDayMargin -
xLabelBirthDaySize -
xLabelBirthDayMargin -
(horizontalLineHeight / 2) -
(yLabelSize / 2) +
(i * ySectionHeight);
drawHorizontalLine(canvas, offsetDx, yCenter);
}
}
}