<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script>
window.addEventListener('DOMContentLoaded', function() {
var td = [...document.querySelectorAll('td[data-id]')].sort((a,b)=>a.dataset.id-b.dataset.id), div = document.querySelectorAll('.item');
[].forEach.call(td, function(el,i) {
var height = el.textContent * 100 + "%";
div[i].style.height = height ;
});
});
</script>
</head>
<body>
<table class="ratio-table">
<tr>
<td data-id='1'>1</td>
<td data-id='0'>0.8</td>
</tr>
<tr>
<td data-id='7'>1</td>
<td data-id='5'>0.6</td>
</tr>
<tr>
<td data-id='2'>1</td>
<td data-id='6'>0.4</td>
</tr>
<tr>
<td data-id='6'>1</td>
<td data-id='4'>0.2</td>
</tr>
</table>
<div class="container" style="width: 100%; height: 300px;" >
<div class="item" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
<div class="item" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
<div class="item" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
<div class="item" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
<div class="item" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
<div class="item" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
<div class="item" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
<div class="item" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
</div>
</body>
</html>
data-id -номер блока (отсчет от 0).