Skip to content

Commit

Permalink
fix: Adjust SVG dimensions and margins for full graph visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Nov 27, 2024
1 parent 7f6de4c commit faa5467
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hugo-site/layouts/shortcodes/small-world-scale.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
</div>
<div style="display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 1rem;">
<canvas id="networkCanvas3" width="500" height="500" style="max-width: 70%; height: auto;"></canvas>
<div id="scalingChart" style="width: min(500px, 70%); height: 500px;">
<svg width="500" height="500" style="max-width: 70%; height: auto;"></svg>
<div id="scalingChart" style="width: min(500px, 70%); height: 550px;">
<svg width="500" height="550" style="max-width: 70%; height: auto;"></svg>
</div>
</div>
<div style="margin-bottom: 2rem;"></div>
Expand Down
2 changes: 1 addition & 1 deletion hugo-site/static/js/small-world-scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ waitForD3().then(() => {
}

function updateChart() {
const margin = {top: 20, right: 20, bottom: 50, left: 40};
const margin = {top: 20, right: 20, bottom: 60, left: 50};
const chartWidth = width - margin.left - margin.right;
const chartHeight = height - margin.top - margin.bottom;

Expand Down

0 comments on commit faa5467

Please sign in to comment.