stasnislav,
<!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]'), 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="2">0.5</td>
</tr>
</table>
<div class="container" style="width: 100%; height: 300px;" >
<div class="item" data-id="1" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
<div class="item" data-id="2" style="width: 50px; height: 100%; background: orange; display: inline-block;"></div>
</div>
</body>
</html>