JSFiddle - React, Tailwind, and code Playground

by AlexJsh02

HTML

<!-- svg rect bar chart -->
<div class="chart-box">
<svg class="chart" height="200" width="200">
<g class="bar" height="200" width="60">
  <a href="#" tabindex="0">
  <rect x="5" y="0" width="30" height="190"></rect>
  <text x="0" y="190" dy="0.9em">Bar 1</text>
  </a>
</g>
<g class="bar" height="200" width="60">
  <a href="#" tabindex="0">
  <rect x="60" y="50" width="30" height="140"></rect>
  <text x="50" y="190" dy="0.9em">Bar 2</text>
  </a>
</g>
  Sorry, your browser does not support inline SVG.
</svg>
</div>

CSS

.bar {
  /*transition: all .3s ease;*/
}
.chart-box {
  display:inline-block; 
  background-color:#f0f0f5; 
  border: solid 1px black; 
  overflow: hidden; 
  padding: 2px;
}
.chart {
  margin: 10px;
  padding: 10px;
}
.bar rect { 
   fill: red;
}

.bar a:hover rect {
  transform: scale(1.1);
  transform-origin: 50% 50%;
  /*-ms-transform: rotate(180deg);*/
  -ms-transform-origin: 50% 50%;
  /*-webkit-transform: rotate(180deg);*/
  -webkit-transform-origin: 50% 50%;
}
.bar a rect {
  -moz-transition: all 0.5s ease-in-out;
  -o-transition: all 0.5s ease-in-out;
  -webkit-transition: all 0.5s ease-in-out;
  transition: all 0.5s ease-in-out;
  transform: scale(1);
  transform-origin: 50% 50%;
  /*-ms-transform: rotate(0deg);*/
  -ms-transform-origin: 50% 50%;
  /*-webkit-transform: rotate(0deg);*/
  -webkit-transform-origin: 50% 50%;  
}
.bar text {
  fill: #000;
  margin-right: 25px;
  margin-top: 10px;
}