feat: Adjust aspect ratio calculation for code-in-json-benchmark.js

This commit is contained in:
Paul Gauthier 2024-08-15 13:59:55 -07:00 committed by Paul Gauthier (aider)
parent cc0960620c
commit 9f5d5ffe89

View file

@ -52,7 +52,7 @@ document.addEventListener('DOMContentLoaded', function () {
function getAspectRatio() { function getAspectRatio() {
var width = chartContainer.offsetWidth; var width = chartContainer.offsetWidth;
// Gradually change aspect ratio from 2 (landscape) to 1 (square) // Gradually change aspect ratio from 2 (landscape) to 1 (square)
return Math.max(1, Math.min(2, width / 400)); return Math.max(1, Math.min(2, width / 300));
} }
var config = { var config = {