Size the bar graphs

This commit is contained in:
Anton Roslund
2025-04-09 11:15:37 +02:00
parent 3c780066b4
commit aa4aca8060
2 changed files with 4 additions and 1 deletions
@@ -17,7 +17,7 @@ async function portnumDistributionChart() {
// Optional: dynamically size the container
const chartContainer = document.getElementById('portnumDistributionContainer');
chartContainer.style.height = `${labels.length * 25}px`;
chartContainer.style.height = `${labels.length * 35}px`;
const backgroundColors = counts.map(count => {
if (count < 500) return '#7EB26D'; // Green
@@ -67,6 +67,9 @@ async function positionPrecisionGraph() {
const labels = sorted.map(entry => formatPositionPrecision(entry.position_precision));
const counts = sorted.map(entry => entry.count);
const chartContainer = document.getElementById('positionPrecisionContainer');
chartContainer.style.height = `${labels.length *35}px`;
new Chart(ctx, {
type: 'bar',
data: {