initBorder method

void initBorder(
  1. Size size
)

计算边界

Implementation

void initBorder(Size size) {
  startX = yNum! > 0 ? basePadding * 2.5 : basePadding * 2; //预留出y轴刻度值所占的空间
  endX = size.width - basePadding * 2;
  startY = size.height - (isShowXyRuler ? basePadding * 3 : basePadding * 2);
  endY = basePadding * 2;
  _fixedHeight = startY - endY;
  _fixedWidth = endX - startX;
  maxMin = calculateMaxMin(chartBeans);
}