JSFiddle - React, Tailwind, and code Playground
by Munim Munna
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css">
<h1>Testing</h1>
<div align="center" class="table table-responsive">
<table id="dailySales">
</table>
</div>
CSS
table.table-bordered>thead>tr>th {
border: 1px solid white;
white-space: nowrap;
border-collapse: collapse;
font-family: Verdana;
font-size: 9pt;
padding: 5px 5px 5px 5px;
background-color: rgba(29, 150, 178, 1);
font-weight: normal;
text-align: center;
color: white;
}
/* background-color: #00998C */
table.table-bordered>tbody>tr>td {
border: 1px solid rgba(29, 150, 178, 1);
white-space: nowrap;
border-collapse: collapse;
font-family: Verdana;
font-size: 8pt;
background-color: rgba(84, 83, 72, .1);
padding: 5px 5px 5px 5px;
}
JavaScript
var data = [
{
"billdate": "2018-08-01",
"outlet": "JAYANAGAR",
"gross": 274659,
"discount": 297,
"GST": 16479,
"amount": 290954
},
{
"billdate": "2018-08-01",
"outlet": "MALLESHWARAM",
"gross": 55185,
"discount": 0,
"GST": 3074,
"amount": 58281
},
{
"billdate": "2018-08-01",
"outlet": "KOLAR",
"gross": 62513,
"discount": 0,
"GST": 3306,
"amount": 65880
},
{
"billdate": "2018-08-02",
"outlet": "JAYANAGAR",
"gross": 279509,
"discount": 68,
"GST": 16582,
"amount": 296125
},
{
"billdate": "2018-08-02",
"outlet": "MALLESHWARAM",
"gross": 53462,
"discount": 0,
"GST": 3064,
"amount": 56545
},
{
"billdate": "2018-08-02",
"outlet": "KOLAR",
"gross": 68651,
"discount": 0,
"GST": 3492,
"amount": 72213
},
{
"billdate": "2018-08-03",
"outlet": "JAYANAGAR",
"gross": 327097,
"discount": 539,
"GST": 19945,
"amount": 346605
},
{
"billdate": "2018-08-03",
"outlet": "MALLESHWARAM",
"gross": 59341,
"discount": 105,
"GST": 3370,
"amount": 62459
},
{
"billdate": "2018-08-03",
"outlet": "KOLAR",
"gross": 61953,
"discount": 0,
"GST": 3225,
"amount": 65248
},
{
"billdate": "2018-08-04",
"outlet": "JAYANAGAR",
"gross": 490465,
"discount": 839,
"GST": 28465,
"amount": 518212
},
{
"billdate": "2018-08-04",
"outlet": "MALLESHWARAM",
"gross": 99212,
"discount": 0,
"GST": 5567,
"amount": 104801
},
{
"billdate": "2018-08-04",
"outlet": "KOLAR",
"gross": 131349,
"discount": 0,
"GST": 6676,
"amount": 138151
},
{
"billdate": "2018-08-05",
"outlet": "JAYANAGAR",
"gross": 594466,
"discount": 591,
"GST": 34374,
"amount": 628358
},
{
"billdate": "2018-08-05",
"outlet": "MALLESHWARAM",
"gross": 109134,
"discount": 0,
...