mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-12 15:45:00 +00:00
fix charts
This commit is contained in:
parent
c3fcaeac5e
commit
d306b456a7
3 changed files with 6 additions and 29 deletions
|
@ -42,7 +42,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
data: data,
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
x: {
|
||||
title: {
|
||||
|
@ -105,16 +104,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
}]
|
||||
};
|
||||
|
||||
// Adjust chart height based on screen width
|
||||
function adjustChartHeight() {
|
||||
var container = document.getElementById('passRateChart');
|
||||
container.height = 600;
|
||||
}
|
||||
|
||||
// Call the function initially and on window resize
|
||||
adjustChartHeight();
|
||||
window.addEventListener('resize', adjustChartHeight);
|
||||
|
||||
function createStripedCanvas(isStrict) {
|
||||
const patternCanvas = document.createElement('canvas');
|
||||
const patternContext = patternCanvas.getContext('2d');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<canvas id="passRateChart" width="800" height="400" style="margin-bottom: 20px"></canvas>
|
||||
<canvas id="syntaxErrorsChart" width="800" height="400" style="margin-bottom: 20px"></canvas>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
|
@ -41,7 +41,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
data: data,
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
x: {
|
||||
title: {
|
||||
|
@ -104,16 +103,6 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
}]
|
||||
};
|
||||
|
||||
// Adjust chart height based on screen width
|
||||
function adjustChartHeight() {
|
||||
var container = document.getElementById('passRateChart');
|
||||
container.height = 600;
|
||||
}
|
||||
|
||||
// Call the function initially and on window resize
|
||||
adjustChartHeight();
|
||||
window.addEventListener('resize', adjustChartHeight);
|
||||
|
||||
new Chart(ctx, config);
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue