mirror of
https://github.com/Roslund/sthlm-mesh.git
synced 2026-08-06 17:02:56 +02:00
Size the bar graphs
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user