Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
AltmannPeter authored Jul 28, 2023
1 parent 3f27269 commit a6dd4d4
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,52 +109,7 @@ function updateTable() {
row.appendChild(asrCell);
tableBody.appendChild(row);
});
generateGraph(); // Call generateGraph after updating the table
}

function generateGraph() {
const biases = [];
const compressedSizes = [];

// Extract relevant data for the chart
analysisData.forEach((data) => {
biases.push(data.bias.toFixed(2) + "%");
compressedSizes.push(data.compressedSize);
});

const ctx = document.getElementById("analysis-chart").getContext("2d");
const chart = new Chart(ctx, {
type: "bar",
data: {
labels: biases,
datasets: [
{
label: "Gzip Compressed ASL Size (bytes)",
data: compressedSizes,
backgroundColor: "rgba(75, 192, 192, 0.6)",
borderColor: "rgba(75, 192, 192, 1)",
borderWidth: 1,
},
],
},
options: {
responsive: true,
scales: {
x: {
type: "linear",
min: 0,
ticks: {
stepSize: 1,
},
y: {
beginAtZero: true,
},
},
},
});
}



// Show an empty table when the page loads
updateTable();

0 comments on commit a6dd4d4

Please sign in to comment.