Skip to content

Commit

Permalink
update exampels
Browse files Browse the repository at this point in the history
  • Loading branch information
joewdavies committed Sep 12, 2024
1 parent 89047ce commit df56b49
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 56 deletions.
29 changes: 1 addition & 28 deletions build/dorling.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/gdp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<div class="dorling-header">
<!-- TITLE -->
<div class="dorling-title">
<h4>Gross domestic product, 2021</h4>
<h4>Gross domestic product, 2022</h4>
<h5>(€ million and PPS per inhabitant)</h5>
</div>

Expand Down
27 changes: 0 additions & 27 deletions src/dorling.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,33 +594,6 @@ export function dorling() {
return adjustedRadius
}

// Select the SVG element by its ID
// const svgElement = document.getElementById('dorling-svg');

// // Get the bounding rectangle (rendered size in the browser)
// const boundingRect = svgElement.getBoundingClientRect();

// // Extract the width and height from the bounding rectangle
// const renderedWidth = boundingRect.width;
// const renderedHeight = boundingRect.height;

// const viewBox1Width = out.viewbox[2]
// const viewBox1Height = out.viewbox[3]

// const svg2Width = 85 // Second SVG's width
// const svg2Height = 340 // Second SVG's height

// // Scale factors
// const widthScale = viewBox1Width / svg2Width // 982 / 500 = 1.964
// const heightScale = viewBox1Height / svg2Height // 1181 / 500 = 2.362

// // Average scale factor
// const scaleFactor = (widthScale + heightScale) / 2 // ~2.163

// const adjustedRadius = radius / scaleFactor // 20 / 2.163 ≈ 9.25
// return adjustedRadius
// }

/**
* @description Removes all DOM nodes from all of the visualizations containers
*
Expand Down

0 comments on commit df56b49

Please sign in to comment.