JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://cloud.github.com/downloads/kangax/fabric.js/all.min.js"></script>
<div><strong>Width: </strong> <span id="width"></span></div>
<div><strong>Height: </strong> <span id="height"></span></div>
<div><strong>Left: </strong> <span id="x"></span></div>
<div><strong>top: </strong> <span id="y"></span></div>

<svg version="1.0" xmlns="http://www.w3.org/2000/svg" id="svg">
<rect id="container_svg_ChartArea" x="146.8" y="20" width="633.2" height="414" fill="White" stroke-width="1" stroke="Gray"></rect>
</svg>

JavaScript

var bbox = $("#container_svg_ChartArea")[0].getBBox()

var els = ["width","height", "x", "y"]
 .map(function(id){
    return document.getElementById(id);
 })
 .forEach(function(el, i){
  el.innerHTML = bbox[el.id];
 });