aider: Change the graph to a horizontal bar graph.

# Aider chat conversation:

USER: make the graph a horizontal bar graph

ASSISTANT: ```diff
--- docs/leaderboard.md
+++ docs/leaderboard.md
@@ ... @@
 <script>
   document.addEventListener('DOMContentLoaded', function () {
     var ctx = document.getElementById('leaderboardChart').getContext('2d');
     var leaderboardData = {
       labels: [],
       datasets: [{
         label: 'Percent correct',
         data: [],
         backgroundColor: 'rgba(54, 162, 235, 0.2)',
         borderColor: 'rgba(54, 162, 235, 1)',
         borderWidth: 1
       }]
     };

     {% for row in sorted %}
       leaderboardData.labels.push('{{ row.model }}');
       leaderboardData.datasets[0].data.push({{ row.second }});
     {% endfor %}

-    var leaderboardChart = new Chart(ctx, {
-      type: 'bar',
+    var leaderboardChart = new Chart(ctx, {
+      type: 'horizontalBar',
       data: leaderboardData,
       options: {
         scales: {
-          yAxes: [{
+          xAxes: [{
             scaleLabel: {
               display: true,
             },
             ticks: {
               beginAtZero: true
             }
           }]
         }
       }
     });
   });
 </script>
```
This commit is contained in:
Paul Gauthier 2024-05-04 10:22:54 -07:00
parent e9228e0ed8
commit 753ea441ea

View file

@ -60,11 +60,11 @@ it will work best with models that score well on the code editing benchmark.
{% endfor %}
var leaderboardChart = new Chart(ctx, {
type: 'bar',
type: 'horizontalBar',
data: leaderboardData,
options: {
scales: {
yAxes: [{
xAxes: [{
scaleLabel: {
display: true,
},