fix charts

This commit is contained in:
Paul Gauthier 2024-08-15 13:33:46 -07:00
parent c3fcaeac5e
commit d306b456a7
3 changed files with 6 additions and 29 deletions

View file

@ -42,7 +42,6 @@ document.addEventListener('DOMContentLoaded', function () {
data: data, data: data,
options: { options: {
responsive: true, responsive: true,
maintainAspectRatio: false,
scales: { scales: {
x: { x: {
title: { 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) { function createStripedCanvas(isStrict) {
const patternCanvas = document.createElement('canvas'); const patternCanvas = document.createElement('canvas');
const patternContext = patternCanvas.getContext('2d'); const patternContext = patternCanvas.getContext('2d');

View file

@ -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> <script>
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
@ -41,7 +41,6 @@ document.addEventListener('DOMContentLoaded', function () {
data: data, data: data,
options: { options: {
responsive: true, responsive: true,
maintainAspectRatio: false,
scales: { scales: {
x: { x: {
title: { 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); new Chart(ctx, config);
}); });
</script> </script>

View file

@ -12,12 +12,11 @@ nav_exclude: true
# LLMs are bad at returning code in JSON # LLMs are bad at returning code in JSON
Current LLMs have support for returning properly formatted JSON, AI coding applications should avoid asking LLMs to return code as part of a structured
making it easier for clients to reliably parse complex responses. JSON response.
It therefore seems attractive for Even though many current LLMs have special support for returning JSON,
AI coding applications ask LLMs to return code in structured JSON replies. it causes LLMs to write worse code and
Unfortunately, harms their ability
LLMs write worse code when asked to wrap it in JSON, harming their ability
to correctly solve coding tasks. to correctly solve coding tasks.
On a variant of the aider code editing benchmark, On a variant of the aider code editing benchmark,
asking for JSON-wrapped code asking for JSON-wrapped code