mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 10:45:00 +00:00
feat: Adjust chart settings for different screen sizes
This commit is contained in:
parent
2b03b58018
commit
6230060d6a
1 changed files with 5 additions and 3 deletions
|
@ -57,9 +57,11 @@ top coding models, as compared to their previous "solo" scores (striped bars).
|
||||||
// Function to determine aspect ratio and base font size based on screen width
|
// Function to determine aspect ratio and base font size based on screen width
|
||||||
function getChartSettings() {
|
function getChartSettings() {
|
||||||
if (window.innerWidth < 600) {
|
if (window.innerWidth < 600) {
|
||||||
return { aspectRatio: 1.2, baseFontSize: 8 }; // Slightly taller for small screens
|
return { aspectRatio: 1, baseFontSize: 8 }; // Slightly taller for small screens
|
||||||
|
} else if (window.innerWidth < 800) {
|
||||||
|
return { aspectRatio: 1.2, baseFontSize: 10 }; // Slightly taller for small screens
|
||||||
} else {
|
} else {
|
||||||
return { aspectRatio: 1.7, baseFontSize: 12 }; // Slightly taller for larger screens
|
return { aspectRatio: 1.4, baseFontSize: 12 }; // Slightly taller for larger screens
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +170,7 @@ top coding models, as compared to their previous "solo" scores (striped bars).
|
||||||
position: 'start',
|
position: 'start',
|
||||||
xAdjust: 10,
|
xAdjust: 10,
|
||||||
font: {
|
font: {
|
||||||
size: baseFontSize
|
size: baseFontSize-4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue