import { RECTANGULAR_CHART_DIMENSIONS, CHART_DIMENSIONS } from "./constants.js";
function calculateRectangularChartLayout(height, aspectRatio = RECTANGULAR_CHART_DIMENSIONS.DEFAULT_ASPECT_RATIO) {
  const isTooSmall = height < RECTANGULAR_CHART_DIMENSIONS.MIN_HEIGHT_WITH_LABELS;
  const width = height * aspectRatio;
  const padding = isTooSmall ? { top: 0, right: 0, bottom: 0, left: 0 } : {
    top: CHART_DIMENSIONS.CANVAS_PADDING,
    right: CHART_DIMENSIONS.CANVAS_PADDING,
    bottom: CHART_DIMENSIONS.CANVAS_PADDING,
    left: CHART_DIMENSIONS.CANVAS_PADDING
  };
  return {
    width,
    height,
    aspectRatio,
    padding,
    isTooSmall
  };
}
export {
  calculateRectangularChartLayout
};
//# sourceMappingURL=rectangular-chart-layout.js.map
