axisLeftReserved static method

double axisLeftReserved(
  1. ChartConfig config
)

Space left of the plot for y-axis tick labels plus the optional rotated y-axis title, so neither clips the left edge nor overlaps the plot.

Implementation

static double axisLeftReserved(ChartConfig config) {
  var width = 0.0;
  if (config.showAxis) {
    width += _yAxisLabelBand;
  }
  if (_hasText(config.yAxisTitle)) {
    width += _axisTitleBand;
  }
  return width;
}