Aqua Chart

by Raúl Rojas

HTML

<div class="wrapper">
  <div class="green">
    <div class="progress">
      <div class="inner">
        <div class="percent"><span></span>%</div>
        <div class="water" data-percentage="30%"></div>
        <div class="glare"></div>
      </div>
    </div>
  </div>

</div>

CSS

.wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: box;
  display: flex;
  -webkit-box-align: center;
  -o-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -o-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-orient: vertical;
  -o-box-orient: vertical;
  -ms-flex-direction: column;
  flex-direction: column;
  height: 100%;
  background: black;
}

.green .progress,
.red .progress,
.orange .progress {
  position: relative;
  border-radius: 50%;
}

.green .progress,
.red .progress,
.orange .progress {
  width: 250px;
  height: 250px;
}

.green .progress {
  border: 5px solid #53fc53;
}

.green .progress {
  -webkit-box-shadow: 0 0 20px #029502;
  box-shadow: 0 0 20px #029502;
}

.green .progress,
.red .progress,
.orange .progress {
  -webkit-transition: all 1s ease;
  transition: all 1s ease;
}

.green .progress .inner,
.red .progress .inner,
.orange .progress .inner {
  position: absolute;
  overflow: hidden;
  z-index: 2;
  border-radius: 50%;
}

.green .progress .inner,
.red .progress .inner,
.orange .progress .inner {
  width: 240px;
  height: 240px;
}

.green .progress .inner,
.red .progress .inner,
.orange .progress .inner {
  border: 5px solid #1a1a1a;
}

.green .progress .inner,
.red .progress .inner,
.orange .progress .inner {
  -webkit-transition: all 1s ease;
  transition: all 1s ease;
}

.green .progress .inner .water,
.red .progress .inner .water,
.orange .progress .inner .water {
  position: absolute;
  z-index: 1;
  width: 200%;
  height: 200%;
  left: -50%;
  border-radius: 40%;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  -webkit-animation-timing-function: linear;
  animation-timing-function: linear;
  -webkit-animation-name: spin;
  animation-name: spin;
}

/*.green .progress .inner .water {
  top: 40%;
}*/

.green .progress .inner .water {
  background: rgba(83, 252, 83, 0.5);
}

.green .progress .inner...

JavaScript

var Full = $('.water').css('top', '100%');
var topFill = $('.water').attr('data-percentage');


var hh = (Full) - (topFill);


$('.water').each(function() {
  $(this).css('top', topFill)
});



//.css('width','calc(100% - 15px)');
// $(this).attr('data-percentage')

//  $(this).css('top',topFill);