JSFiddle - React, Tailwind, and code Playground

Config Windows

by chrischilcoat

HTML

<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://yakabod.yakabox.com/css/scss/themes/darkly/ui_dark.css">
<div class="ui-yakabox-dashboard-graph-config">
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: block;">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
        <h4 class="modal-title" id="myModalLabel">Setup your Pie Chart</h4>
      </div>
      <div class="modal-body clearfix">
        <div class="row" style="border-bottom: 1px solid rgb(229, 229, 229);
; background:#efefef url('https://www.reabilityamd.com.br/wp-content/themes/reability/images/textures/worn_dots.png'); margin:-20px -20px 20px; padding:20px 8px 0;">
          <div class="col-xs-12">
            <div class="panel panel-default">
              <div class="panel-body">
               <div class="ui-yakabox-chart-wrapper">
                 <div class="row">
                   <div class="col-sm-7 col-xs-12">
                     <div id="doughnutChart" class="chart">
                     </div>
                   </div>
                   <div class="col-sm-4 col-xs-12">
                     <ul class="list-group">
                       <li class="list-group-item"><i class="fa fa-circle"  style="color:#35a8ff;"></i> Time Used</li>
                       <li class="list-group-item"><i class="fa fa-circle" style="color:#f3e32b;"></i> Enroll Time</li>
                       <li class="list-group-item"><i class="fa fa-circle"></i> Time Remaining</li>
            ...

SCSS

.ui-yakabox-dashboard-graph-config {
  
  .control-label {
    text-align:left !important;
  }
  .modal-dialog {
    max-width:600px;
  }
  .chart {
    margin: 0 auto;
    width: 250px;
    height: 250px;
    position: relative;
  }
  .doughnutTip {
    position: absolute;
    float: left;
    min-width: 30px;
    max-width: 300px;
    padding: 5px 15px;
    border-radius: 1px;
    background: rgba(0,0,0,.8);
    color: #ddd;
    font-size: 17px;
    text-shadow: 0 1px 0 #000;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.3;
    letter-spacing: .06em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    transform: all .3s;
    pointer-events: none;
  }
  .doughnutTip:after {
    position: absolute;
    left: 50%;
    bottom: -6px;
    content: "";
    height: 0;
    margin: 0 0 0 -6px;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    border-top: 6px solid rgba(0,0,0,.7);
    line-height: 0;
  }
  .doughnutSummary {
    display:none;
  }
  .doughnutSummaryTitle {
    display:none;
  }
  .doughnutTypeTitle {
    display:none;
  }
  .doughnutSummaryNumber {
    display:none;
  }
  .chart path:hover { 
    opacity: .65; 
  }
  .ui-yakabox-chart-wrapper {
    .list-group {
     // text-align:center;
      margin:0;
      margin-top:90px;
      .list-group-item {
        //display:inline-block;
        border:none;
        //text-align:center;
        padding:0;
      }
    }
  }
  .form-group {
    .list-group {
     // text-align:center;
      margin:0;
      .list-group-item {
        //display:inline-block;
        border:none;
        //text-align:center;
        padding:0;
        .fa {
        }
      }
    }
  }
  
}

JavaScript

var $btnLH = $(".btnLH"),
  $btnLL = $(".btnLL"),
  $btnLI = $(".btnLI"),
  $btnLO = $(".btnLO"),
  $btnLLR = $(".btnLLR"),
  $btnLLL = $(".btnLLL"),
  $btnLLT = $(".btnLLT"),
  $btnLLB = $(".btnLLB"),
  $chart = $(".ui-yakabox-chart-wrapper"),
  x = function() {
    $chart
      .removeClass('tooltip')
      .removeClass('outside')
      .removeClass('legend');
  },
  y = function() {
    $btnLT.removeClass('active');
    $btnLO.removeClass('active');
    $btnLL.removeClass('active');
  };

$btnLH.on('click', function(event) {
  
  $(this).addClass('active');
  event.preventDefault();
});

$btnLL.on('click', function(event) {
  $(this).addClass('active');
  event.preventDefault();
});

$btnLI.on('click', function(event) {
  $(this).addClass('active');
  event.preventDefault();
});

$btnLO.on('click', function(event) {
  $(this).addClass('active');
  event.preventDefault();
});

$btnLLR.on('click', function(event) {
  $(this).addClass('active');
  event.preventDefault();
});

$btnLLL.on('click', function(event) {
  $(this).addClass('active');
  event.preventDefault();
});

$btnLLT.on('click', function(event) {
  $(this).addClass('active');
  event.preventDefault();
});

$btnLLB.on('click', function(event) {
  $(this).addClass('active');
  event.preventDefault();
});

$(function () {
  $('[data-toggle="tooltip"]').tooltip();
})


;(function($, undefined) {

  $.fn.drawDoughnutChart = function(data, options) {
    var $this = this,
      W = $this.width(),
      H = $this.height(),
      centerX = W/2,
      centerY = H/2,
      cos = Math.cos,
      sin = Math.sin,
      PI = Math.PI,
      settings = $.extend({
        segmentShowStroke : true,
        segmentStrokeColor : "#fff",
        segmentStrokeWidth : 0,
        baseColor: "rgba(255,255,255,1)",
        baseOffset: 4,
        edgeOffset : 10,//offset from edge of $this
        percentageInnerCutout : 0,
        animation : true,
        animationSteps : 90,
        animationEasing : "easeInOutExpo",
     ...